CMake: Re-enable usability of system QtSingleApplication

This seem to have gone broken over time.
As far as I can tell, upstream QtSingleApplication works fine!

Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
This commit is contained in:
Marcus Müller 2023-09-17 10:09:39 +02:00 committed by John Maguire
parent 6820a0a58d
commit f3837f95db
1 changed files with 6 additions and 4 deletions

View File

@ -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)