diff -rupN clementine-0.4.2.old/CMakeLists.txt clementine-0.4.2/CMakeLists.txt
--- clementine-0.4.2.old/CMakeLists.txt 2010-07-16 22:31:50.000000000 -0400
+++ clementine-0.4.2/CMakeLists.txt 2010-07-16 22:42:41.000000000 -0400
@@ -124,7 +124,7 @@ option(ENABLE_VISUALISATIONS "Use libpro
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 libprojectM)
@@ -157,8 +157,19 @@ 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)
diff -rupN clementine-0.4.2.old/src/CMakeLists.txt clementine-0.4.2/src/CMakeLists.txt
--- clementine-0.4.2.old/src/CMakeLists.txt 2010-07-16 22:34:36.000000000 -0400
+++ clementine-0.4.2/src/CMakeLists.txt 2010-07-16 22:43:28.000000000 -0400
@@ -6,7 +6,6 @@ set(CMAKE_CXX_FLAGS "-Woverloaded-virtua
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/qxt)
@@ -14,6 +13,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)
@@ -449,7 +449,6 @@ add_library(clementine_lib STATIC
add_dependencies(clementine_lib pot)
target_link_libraries(clementine_lib
- qtsingleapplication
qtiocompressor
chardet
${GOBJECT_LIBRARIES}
@@ -458,6 +457,7 @@ target_link_libraries(clementine_lib
${QT_LIBRARIES}
${ENGINE_LIBRARIES}
${LASTFM_LIBRARIES}
+ ${QTSINGLEAPPLICATION_LIBRARIES}
)
if(ENABLE_VISUALISATIONS)