1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 12:28:31 +01:00

Add cmake options for more libraries.

Fixes issue #738
Thanks to Nickollai for the patch.
This commit is contained in:
John Maguire 2010-09-22 13:05:51 +00:00
parent ba6ad3cb4a
commit 0c281bb837
3 changed files with 17 additions and 13 deletions

View File

@ -112,6 +112,10 @@ if(NOT GETTEXT_XGETTEXT_EXECUTABLE)
endif(NOT GETTEXT_XGETTEXT_EXECUTABLE) endif(NOT GETTEXT_XGETTEXT_EXECUTABLE)
# Optional bits # Optional bits
option(ENABLE_LIBGPOD "iPod classic support" ON)
option(ENABLE_IMOBILEDEVICE "iPod Touch, iPhone, iPad support" ON)
option(ENABLE_LIBMTP "MTP support" ON)
option(ENABLE_GIO "GIO backend" ON)
option(ENABLE_VISUALISATIONS "Use libprojectm visualisations" ON) option(ENABLE_VISUALISATIONS "Use libprojectm visualisations" ON)
option(BUNDLE_PROJECTM_PRESETS "Install Clementine's own copies of libprojectm presets - disable this if you want to use a system package instead" ON) option(BUNDLE_PROJECTM_PRESETS "Install Clementine's own copies of libprojectm presets - disable this if you want to use a system package instead" ON)
@ -119,21 +123,21 @@ if(NOT APPLE AND NOT WIN32)
option(ENABLE_WIIMOTEDEV "Enable Wii remote support in Clementine" ON) option(ENABLE_WIIMOTEDEV "Enable Wii remote support in Clementine" ON)
endif(NOT APPLE AND NOT WIN32) endif(NOT APPLE AND NOT WIN32)
if(LIBGPOD_FOUND) if(ENABLE_LIBGPOD AND LIBGPOD_FOUND)
set(HAVE_LIBGPOD ON) set(HAVE_LIBGPOD ON)
endif(LIBGPOD_FOUND) endif(ENABLE_LIBGPOD AND LIBGPOD_FOUND)
if(GIO_FOUND) if(ENABLE_GIO AND GIO_FOUND)
set(HAVE_GIO ON) set(HAVE_GIO ON)
endif(GIO_FOUND) endif(ENABLE_GIO AND GIO_FOUND)
if(IMOBILEDEVICE_FOUND AND PLIST_FOUND AND LIBGPOD_FOUND AND USBMUXD_FOUND) if(ENABLE_IMOBILEDEVICE AND IMOBILEDEVICE_FOUND AND PLIST_FOUND AND HAVE_LIBGPOD AND USBMUXD_FOUND)
set(HAVE_IMOBILEDEVICE ON) set(HAVE_IMOBILEDEVICE ON)
endif(IMOBILEDEVICE_FOUND AND PLIST_FOUND AND LIBGPOD_FOUND AND USBMUXD_FOUND) endif(ENABLE_IMOBILEDEVICE AND IMOBILEDEVICE_FOUND AND PLIST_FOUND AND HAVE_LIBGPOD AND USBMUXD_FOUND)
if(LIBMTP_FOUND) if(ENABLE_LIBMTP AND LIBMTP_FOUND)
set(HAVE_LIBMTP ON) set(HAVE_LIBMTP ON)
endif(LIBMTP_FOUND) endif(ENABLE_LIBMTP AND LIBMTP_FOUND)
if(ENABLE_VISUALISATIONS) if(ENABLE_VISUALISATIONS)
# When/if upstream accepts our patches then these options can be used to link # When/if upstream accepts our patches then these options can be used to link
@ -228,7 +232,7 @@ add_custom_target(uninstall
# Show a summary of what we have enabled # Show a summary of what we have enabled
summary_add("devices: iPod classic support" HAVE_LIBGPOD) summary_add("devices: iPod classic support" HAVE_LIBGPOD)
summary_add("devices: iPod Touch, iPhone, iPad support" HAVE_IMOBILEDEVICE) summary_add("devices: iPod Touch, iPhone, iPad support" HAVE_IMOBILEDEVICE)
summary_add("devices: MTP support" LIBMTP_FOUND) summary_add("devices: MTP support" HAVE_LIBMTP)
summary_add("devices: GIO backend" HAVE_GIO) summary_add("devices: GIO backend" HAVE_GIO)
summary_add("Wiimote support" ENABLE_WIIMOTEDEV) summary_add("Wiimote support" ENABLE_WIIMOTEDEV)
summary_add("Visualisations" ENABLE_VISUALISATIONS) summary_add("Visualisations" ENABLE_VISUALISATIONS)

View File

@ -680,9 +680,9 @@ if(HAVE_IMOBILEDEVICE)
link_directories(${USBMUXD_LIBRARY_DIRS}) link_directories(${USBMUXD_LIBRARY_DIRS})
endif(HAVE_IMOBILEDEVICE) endif(HAVE_IMOBILEDEVICE)
if(LIBMTP_FOUND) if(HAVE_LIBMTP)
target_link_libraries(clementine_lib ${LIBMTP_LIBRARIES}) target_link_libraries(clementine_lib ${LIBMTP_LIBRARIES})
endif(LIBMTP_FOUND) endif(HAVE_LIBMTP)
if (APPLE) if (APPLE)
target_link_libraries(clementine_lib target_link_libraries(clementine_lib

View File

@ -7,9 +7,9 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src) include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src)
include_directories(${QT_QTTEST_INCLUDE_DIR}) include_directories(${QT_QTTEST_INCLUDE_DIR})
if(LIBGPOD_FOUND) if(HAVE_LIBGPOD)
include_directories(${LIBGPOD_INCLUDE_DIRS}) include_directories(${LIBGPOD_INCLUDE_DIRS})
endif(LIBGPOD_FOUND) endif(HAVE_LIBGPOD)
set(GTEST-SOURCES set(GTEST-SOURCES
../3rdparty/gmock/gtest/src/gtest.cc ../3rdparty/gmock/gtest/src/gtest.cc