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:46:52.000000000 -0400
+++ clementine-0.4.2/CMakeLists.txt 2010-07-18 14:42:16.000000000 -0400
@@ -110,7 +110,6 @@ if (WIN32)
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -o <OBJECT> <SOURCE> -I../../dist/windows")
endif(WIN32)
-add_definitions(-DQXT_STATIC -DBUILD_QXT_GUI -DBUILD_QXT_CORE)
add_definitions(-DQT_NO_CAST_TO_ASCII)
# Translations stuff
@@ -179,11 +178,26 @@ if(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NO
set(QTIOCOMPRESSOR_LIBRARIES qtiocompressor)
endif(NOT QTIOCOMPRESSOR_INCLUDE_DIRS OR NOT QTIOCOMPRESSOR_LIBRARIES)
+# When/if upstream accepts our or reimplement our patches then these options can be
+# used to link to system installed qxt instead.
+option(USE_SYSTEM_QXT "Don't set this option unless your system Qxt library has been compiled with the Clementine patches in 3rdparty" OFF)
+if (USE_SYSTEM_QXT)
+ find_path(QXTCORE_INCLUDE_DIRS qxtglobal.h PATH_SUFFIXES QxtCore)
+ find_path(QXTGUI_INCLUDE_DIRS qxtglobalshortcut.h PATH_SUFFIXES QxtGui)
+ set(QXT_INCLUDE_DIRS ${QXTCORE_INCLUDE_DIRS} ${QXTGUI_INCLUDE_DIRS})
+ # We only need its header. We don't need to link to QxtCore.
+ find_library(QXT_LIBRARIES QxtGui)
+else (USE_SYSTEM_QXT)
+ if (NOT APPLE)
+ add_subdirectory(3rdparty/qxt)
+ add_definitions(-DQXT_STATIC -DBUILD_QXT_GUI -DBUILD_QXT_CORE)
+ set(QXT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qxt)
+ set(QXT_LIBRARIES qxt)
+ endif (NOT APPLE)
+endif (USE_SYSTEM_QXT)
+
# Subdirectories
add_subdirectory(src)
-if (NOT APPLE)
- add_subdirectory(3rdparty/qxt)
-endif (NOT APPLE)
add_subdirectory(3rdparty/universalchardet)
add_subdirectory(tests)
add_subdirectory(dist)
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:47:48.000000000 -0400
+++ clementine-0.4.2/src/CMakeLists.txt 2010-07-18 14:05:51.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/qxt)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${LIBXML_INCLUDE_DIRS})
@@ -14,6 +13,7 @@ include_directories(${GOBJECT_INCLUDE_DI
include_directories(${LIBPROJECTM_INCLUDE_DIRS})
include_directories(${QTSINGLEAPPLICATION_INCLUDE_DIRS})
include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS})
+include_directories(${QXT_INCLUDE_DIRS})
cmake_policy(SET CMP0011 NEW)
include(../cmake/AddEngine.cmake)
@@ -475,7 +475,7 @@ if (APPLE)
)
include_directories(${SPARKLE}/Headers)
else (APPLE)
- target_link_libraries(clementine_lib qxt)
+ target_link_libraries(clementine_lib ${QXT_LIBRARIES})
endif (APPLE)
# Link against the qsqlite plugin on windows and mac