From 659fe8394081c2645703c1555a16d9a4f44de561 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 28 Nov 2023 08:05:44 +0100 Subject: [PATCH] fix --- CMakeLists.txt | 12 +++++++++--- src/librssguard/CMakeLists.txt | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 089e484ba..61386de7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/src/librssguard/CMakeLists.txt b/src/librssguard/CMakeLists.txt index e6fa576c5..a6e4c1c5e 100644 --- a/src/librssguard/CMakeLists.txt +++ b/src/librssguard/CMakeLists.txt @@ -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)