Make the Ubuntu and Fedora packages depend on sparsehash, and use the builtin taglib by default if the system's version is too old

This commit is contained in:
David Sansome 2012-10-27 17:25:27 -07:00
parent 66ce3b4408
commit e5b2cacb20
4 changed files with 13 additions and 9 deletions

View File

@ -320,7 +320,7 @@ foreach(header ${tag_HDRS})
get_filename_component(header_name ${header} NAME)
configure_file(
"${header}"
"${CMAKE_CURRENT_BINARY_DIR}/headers/${header_name}"
"${CMAKE_CURRENT_BINARY_DIR}/headers/taglib/${header_name}"
COPY_ONLY
)
endforeach()

View File

@ -73,12 +73,15 @@ find_path(LASTFM1_INCLUDE_DIRS lastfm/Track.h)
find_path(SPARSEHASH_INCLUDE_DIRS google/sparsetable)
# Compile our own taglib if requested. This is so we can build with Google
# Drive support on old versions of Ubuntu.
option(USE_BUILTIN_TAGLIB "Compile a builtin Taglib instead of using the system's version" OFF)
if(USE_BUILTIN_TAGLIB)
# Google Drive support needs Taglib 1.8, but this version isn't in old Ubuntu
# distros. If the user seems to want Drive support (ie. they have sparsehash
# installed and haven't disabled drive), and has an old taglib, compile our
# internal one and use that instead.
option(USE_BUILTIN_TAGLIB "If the system's version of Taglib is too old for Google Drive support, compile our builtin version instead" ON)
if (USE_BUILTIN_TAGLIB AND ENABLE_GOOGLE_DRIVE AND SPARSEHASH_INCLUDE_DIRS AND
TAGLIB_VERSION VERSION_LESS 1.8)
set(TAGLIB_VERSION 1.8)
set(TAGLIB_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/3rdparty/taglib/headers/")
set(TAGLIB_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/3rdparty/taglib/headers/taglib/;${CMAKE_BINARY_DIR}/3rdparty/taglib/headers/")
set(TAGLIB_LIBRARY_DIRS "")
set(TAGLIB_LIBRARIES tag)
add_subdirectory(3rdparty/taglib)
@ -178,7 +181,7 @@ optional_component(BREAKPAD OFF "Crash reporting")
optional_component(GOOGLE_DRIVE ON "Google Drive support"
DEPENDS "Google sparsehash" SPARSEHASH_INCLUDE_DIRS
DEPENDS "Taglib 1.8 beta" "TAGLIB_VERSION VERSION_GREATER 1.7.999"
DEPENDS "Taglib 1.8" "TAGLIB_VERSION VERSION_GREATER 1.7.999"
)
optional_component(AUDIOCD ON "Devices: Audio CD support"

3
debian/control vendored
View File

@ -32,7 +32,8 @@ Build-Depends: debhelper (>= 7),
libprotobuf-dev,
libqca2-dev,
libchromaprint-dev | libfftw3-dev,
libfftw3-dev
libfftw3-dev,
libsparsehash-dev
Standards-Version: 3.8.1
Homepage: http://www.clementine-player.org/

View File

@ -14,7 +14,7 @@ BuildRequires: qt4-devel boost-devel gcc-c++ glew-devel libgpod-devel
BuildRequires: cmake gstreamer-devel gstreamer-plugins-base-devel
BuildRequires: libimobiledevice-devel libplist-devel usbmuxd-devel
BuildRequires: libmtp-devel protobuf-devel protobuf-compiler libcdio-devel
BuildRequires: qjson-devel qca2-devel fftw-devel
BuildRequires: qjson-devel qca2-devel fftw-devel sparsehash-devel
Requires: libgpod protobuf-lite libcdio qjson qca-ossl