From f3837f95db61a8d79c40c8da8467c7e502fc2156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= Date: Sun, 17 Sep 2023 10:09:39 +0200 Subject: [PATCH] CMake: Re-enable usability of system QtSingleApplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seem to have gone broken over time. As far as I can tell, upstream QtSingleApplication works fine! Signed-off-by: Marcus Müller --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf18b116..b162c7f33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,11 +347,13 @@ include_directories("3rdparty/qsqlite") # When/if upstream accepts our patches then these options can be used to link # to system installed qtsingleapplication instead. -option(USE_SYSTEM_QTSINGLEAPPLICATION "Don't set this option unless your system QtSingleApplication library has been compiled with the Clementine patches in 3rdparty" OFF) +option(USE_SYSTEM_QTSINGLEAPPLICATION "Use the system-provided QtSingleApplication library (needs to have clementine patches, but these seem to be in Qt5)" OFF) if(USE_SYSTEM_QTSINGLEAPPLICATION) - find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES qt5/QtSolutions) - find_library(QTSINGLEAPPLICATION_LIBRARIES Qt5Solutions_SingleApplication-2.6) - find_library(QTSINGLECOREAPPLICATION_LIBRARIES Qt5Solutions_SingleCoreApplication-2.6) + find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES qt5/QtSolutions REQUIRED) + find_library(QTSINGLEAPPLICATION_LIBRARIES Qt5Solutions_SingleApplication-2.6 REQUIRED) + add_library(qtsingleapplication INTERFACE) + target_link_libraries(qtsingleapplication INTERFACE QTSINGLEAPPLICATION_LIBRARIES) + target_include_directories(qtsingleapplication INTERFACE QTSINGLEAPPLICATION_INCLUDE_DIRS) else(USE_SYSTEM_QTSINGLEAPPLICATION) add_subdirectory(3rdparty/qtsingleapplication) set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication)