This commit is contained in:
Martin Rotter 2023-11-28 08:05:44 +01:00
parent 33801699ad
commit 659fe83940
2 changed files with 21 additions and 8 deletions

View file

@ -155,17 +155,23 @@ if(NOT OS2)
endif() endif()
if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA) if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA)
list(APPEND QT_COMPONENTS MultimediaWidgets) message(STATUS "Enabling QtMultimedia media player backend.")
list(APPEND QT_COMPONENTS OpenGL MultimediaWidgets)
add_compile_definitions(ENABLE_MEDIAPLAYER_QTMULTIMEDIA) add_compile_definitions(ENABLE_MEDIAPLAYER_QTMULTIMEDIA)
endif() endif()
if(ENABLE_MEDIAPLAYER_LIBMPV) if(ENABLE_MEDIAPLAYER_LIBMPV)
message(STATUS "Enabling libmpv media player backend.")
if(WIN32 AND NOT LibMPV_ROOT) if(WIN32 AND NOT LibMPV_ROOT)
set(LibMPV_ROOT "${CMAKE_SOURCE_DIR}/resources/scripts/libmpv") set(LibMPV_ROOT "${CMAKE_SOURCE_DIR}/resources/scripts/libmpv")
endif() endif()
list(APPEND QT_COMPONENTS OpenGL)
if(BUILD_WITH_QT6) if(BUILD_WITH_QT6)
list(APPEND QT_COMPONENTS OpenGL OpenGLWidgets) list(APPEND QT_COMPONENTS OpenGLWidgets)
endif() endif()
add_compile_definitions(ENABLE_MEDIAPLAYER_LIBMPV) add_compile_definitions(ENABLE_MEDIAPLAYER_LIBMPV)

View file

@ -830,11 +830,18 @@ elseif(ENABLE_MEDIAPLAYER_LIBMPV)
${LibMPV_INCLUDE_DIRS} ${LibMPV_INCLUDE_DIRS}
) )
target_link_libraries(rssguard PUBLIC if(BUILD_WITH_QT6)
Qt${QT_VERSION_MAJOR}::OpenGL target_link_libraries(rssguard PUBLIC
Qt${QT_VERSION_MAJOR}::OpenGLWidgets Qt${QT_VERSION_MAJOR}::OpenGL
${LibMPV_LIBRARIES} Qt${QT_VERSION_MAJOR}::OpenGLWidgets
) ${LibMPV_LIBRARIES}
)
else()
target_link_libraries(rssguard PUBLIC
Qt${QT_VERSION_MAJOR}::OpenGL
${LibMPV_LIBRARIES}
)
endif()
endif() endif()
if(UNIX AND NOT APPLE AND NOT ANDROID) if(UNIX AND NOT APPLE AND NOT ANDROID)