Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > c0a97d3aaff37ea494fc00e5439e1750 > files > 3

clementine-0.6-1.fc13.src.rpm

diff -rupN clementine-0.6.old/CMakeLists.txt clementine-0.6/CMakeLists.txt
--- clementine-0.6.old/CMakeLists.txt	2010-11-21 10:13:26.000000000 -0500
+++ clementine-0.6/CMakeLists.txt	2010-12-23 13:46:55.000000000 -0500
@@ -216,7 +216,15 @@ else (USE_SYSTEM_QXT)
   endif (NOT APPLE)
 endif (USE_SYSTEM_QXT)
 
-set(ECHONEST_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/3rdparty/libechonest)
+# Use system libechonest if it's available
+find_path(ECHONEST_INCLUDE_DIRS echonest/echonest_export.h)
+find_library(ECHONEST_LIBRARIES echonest)
+if(NOT ECHONEST_INCLUDE_DIRS OR NOT ECHONEST_LIBRARIES)
+add_subdirectory(3rdparty/libechonest)
+  set(ECHONEST_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/3rdparty/libechonest)
+  set(ECHONEST_LIBRARIES echonest)
+endif(NOT ECHONEST_INCLUDE_DIRS OR NOT ECHONEST_LIBRARIES)
+
 
 # Subdirectories
 add_subdirectory(src)
@@ -224,7 +232,6 @@ if (WIN32)
   add_subdirectory(3rdparty/qtwin)
 endif (WIN32)
 add_subdirectory(3rdparty/universalchardet)
-add_subdirectory(3rdparty/libechonest)
 add_subdirectory(tests)
 add_subdirectory(dist)
 add_subdirectory(tools/ultimate_lyrics_parser)
diff -rupN clementine-0.6.old/src/CMakeLists.txt clementine-0.6/src/CMakeLists.txt
--- clementine-0.6.old/src/CMakeLists.txt	2010-12-10 09:26:29.000000000 -0500
+++ clementine-0.6/src/CMakeLists.txt	2010-12-23 13:47:27.000000000 -0500
@@ -761,7 +761,7 @@ add_dependencies(clementine_lib pot)
 
 target_link_libraries(clementine_lib
   chardet
-  echonest
+  ${ECHONEST_LIBRARIES}
   ${GOBJECT_LIBRARIES}
   ${GLIB_LIBRARIES}
   ${TAGLIB_LIBRARIES}