1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 03:45:56 +01:00

Use the system version of libchromaprint if available

(cherry picked from commit d17629586f)
This commit is contained in:
David Sansome 2012-01-07 15:25:39 +00:00
parent da2275cd3f
commit 842cfadf6b
3 changed files with 11 additions and 3 deletions

View File

@ -69,6 +69,7 @@ pkg_check_modules(INDICATEQT indicate-qt)
pkg_check_modules(SPOTIFY libspotify>=10.1.16) pkg_check_modules(SPOTIFY libspotify>=10.1.16)
pkg_check_modules(CDIO libcdio) pkg_check_modules(CDIO libcdio)
pkg_check_modules(QCA qca2) pkg_check_modules(QCA qca2)
pkg_check_modules(CHROMAPRINT libchromaprint)
if (WIN32) if (WIN32)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
@ -355,6 +356,13 @@ if(GMOCK_INCLUDE_DIRS)
endif(GTEST_INCLUDE_DIRS) endif(GTEST_INCLUDE_DIRS)
endif(GMOCK_INCLUDE_DIRS) endif(GMOCK_INCLUDE_DIRS)
# Use our 3rdparty chromaprint if a system one wasn't found
if(NOT CHROMAPRINT_FOUND)
add_subdirectory(3rdparty/chromaprint)
set(CHROMAPRINT_LIBRARIES chromaprint_p)
set(CHROMAPRINT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/3rdparty/chromaprint/src)
endif(NOT CHROMAPRINT_FOUND)
# Subdirectories # Subdirectories
add_subdirectory(src) add_subdirectory(src)
if (WIN32) if (WIN32)
@ -365,7 +373,6 @@ add_subdirectory(3rdparty/universalchardet)
add_subdirectory(tests) add_subdirectory(tests)
add_subdirectory(dist) add_subdirectory(dist)
add_subdirectory(tools/ultimate_lyrics_parser) add_subdirectory(tools/ultimate_lyrics_parser)
add_subdirectory(3rdparty/chromaprint)
option(WITH_DEBIAN OFF) option(WITH_DEBIAN OFF)
if(WITH_DEBIAN) if(WITH_DEBIAN)

View File

@ -26,6 +26,7 @@ include_directories(${QTSINGLEAPPLICATION_INCLUDE_DIRS})
include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS}) include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS})
include_directories(${QXT_INCLUDE_DIRS}) include_directories(${QXT_INCLUDE_DIRS})
include_directories(${ECHONEST_INCLUDE_DIRS}) include_directories(${ECHONEST_INCLUDE_DIRS})
include_directories(${CHROMAPRINT_INCLUDE_DIRS})
find_package(OpenGL) find_package(OpenGL)
include_directories(${OPENGL_INCLUDE_DIR}) include_directories(${OPENGL_INCLUDE_DIR})
@ -960,8 +961,8 @@ add_dependencies(clementine_lib pot)
target_link_libraries(clementine_lib target_link_libraries(clementine_lib
chardet chardet
chromaprint_p
sha2 sha2
${CHROMAPRINT_LIBRARIES}
${ECHONEST_LIBRARIES} ${ECHONEST_LIBRARIES}
${GOBJECT_LIBRARIES} ${GOBJECT_LIBRARIES}
${GLIB_LIBRARIES} ${GLIB_LIBRARIES}

View File

@ -22,7 +22,7 @@
#include <QtDebug> #include <QtDebug>
#include <QTime> #include <QTime>
#include "3rdparty/chromaprint/src/chromaprint.h" #include <chromaprint.h>
#include "core/logging.h" #include "core/logging.h"
#include "core/timeconstants.h" #include "core/timeconstants.h"