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,23 +155,29 @@ if(NOT OS2)
endif()
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)
endif()
if(ENABLE_MEDIAPLAYER_LIBMPV)
message(STATUS "Enabling libmpv media player backend.")
if(WIN32 AND NOT LibMPV_ROOT)
set(LibMPV_ROOT "${CMAKE_SOURCE_DIR}/resources/scripts/libmpv")
endif()
list(APPEND QT_COMPONENTS OpenGL)
if(BUILD_WITH_QT6)
list(APPEND QT_COMPONENTS OpenGL OpenGLWidgets)
list(APPEND QT_COMPONENTS OpenGLWidgets)
endif()
add_compile_definitions(ENABLE_MEDIAPLAYER_LIBMPV)
endif()
if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA OR ENABLE_MEDIAPLAYER_LIBMPV)
if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA OR ENABLE_MEDIAPLAYER_LIBMPV)
set(ENABLE_MEDIAPLAYER TRUE)
add_compile_definitions(ENABLE_MEDIAPLAYER)
endif()

View file

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