mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 10:48:33 +01:00
Add a cmake option to use a system install of QtSingleApplication
This commit is contained in:
parent
acf9ff5fd3
commit
9be9a7cc0a
@ -125,7 +125,7 @@ option(ENABLE_VISUALISATIONS "Use libprojectm visualisations" ON)
|
||||
option(BUNDLE_PROJECTM_PRESETS "Install Clementine's own copies of libprojectm presets - disable this if you want to use a system package instead" ON)
|
||||
if(ENABLE_VISUALISATIONS)
|
||||
# When/if upstream accepts our patches then these options can be used to link
|
||||
# to system installed 3rdparty libraries instead.
|
||||
# to system installed projectM instead.
|
||||
option(USE_SYSTEM_PROJECTM "Don't set this option unless your system projectM library has been compiled with the Clementine patches in 3rdparty" OFF)
|
||||
if(USE_SYSTEM_PROJECTM)
|
||||
pkg_check_modules(LIBPROJECTM projectM)
|
||||
@ -158,8 +158,20 @@ if(STATIC_SQLITE)
|
||||
add_subdirectory(3rdparty/qsqlite)
|
||||
endif(STATIC_SQLITE)
|
||||
|
||||
# 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)
|
||||
if(USE_SYSTEM_QTSINGLEAPPLICATION)
|
||||
find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES QtSolutions)
|
||||
find_library(QTSINGLEAPPLICATION_LIBRARIES QtSolutions_SingleApplication-2.6)
|
||||
else(USE_SYSTEM_QTSINGLEAPPLICATION)
|
||||
add_subdirectory(3rdparty/qtsingleapplication)
|
||||
set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication)
|
||||
set(QTSINGLEAPPLICATION_LIBRARIES qtsingleapplication)
|
||||
endif(USE_SYSTEM_QTSINGLEAPPLICATION)
|
||||
|
||||
# Subdirectories
|
||||
add_subdirectory(3rdparty/qtsingleapplication)
|
||||
|
||||
add_subdirectory(3rdparty/qtiocompressor)
|
||||
add_subdirectory(src)
|
||||
if (NOT APPLE)
|
||||
|
@ -6,7 +6,6 @@ set(CMAKE_CXX_FLAGS "-Woverloaded-virtual -Wall")
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${SPARKLE})
|
||||
include_directories(../3rdparty/gmock/gtest/include)
|
||||
include_directories(../3rdparty/qtsingleapplication)
|
||||
include_directories(../3rdparty/qtiocompressor)
|
||||
include_directories(../3rdparty/qtwin)
|
||||
include_directories(../3rdparty/qxt)
|
||||
@ -15,6 +14,7 @@ include_directories(${GLIB_INCLUDE_DIRS})
|
||||
include_directories(${LIBXML_INCLUDE_DIRS})
|
||||
include_directories(${GOBJECT_INCLUDE_DIRS})
|
||||
include_directories(${LIBPROJECTM_INCLUDE_DIRS})
|
||||
include_directories(${QTSINGLEAPPLICATION_INCLUDE_DIRS})
|
||||
|
||||
cmake_policy(SET CMP0011 NEW)
|
||||
include(../cmake/AddEngine.cmake)
|
||||
@ -517,7 +517,6 @@ add_library(clementine_lib STATIC
|
||||
add_dependencies(clementine_lib pot)
|
||||
|
||||
target_link_libraries(clementine_lib
|
||||
qtsingleapplication
|
||||
qtiocompressor
|
||||
qtwin
|
||||
chardet
|
||||
@ -527,6 +526,7 @@ target_link_libraries(clementine_lib
|
||||
${QT_LIBRARIES}
|
||||
${ENGINE_LIBRARIES}
|
||||
${LASTFM_LIBRARIES}
|
||||
${QTSINGLEAPPLICATION_LIBRARIES}
|
||||
)
|
||||
|
||||
if(ENABLE_VISUALISATIONS)
|
||||
|
Loading…
Reference in New Issue
Block a user