Make installing the projectm presets optional too - useful for if you want to use the ones from a system package instead.

Update issue #391
Status: Fixed
I've made installing the presets optional too, the cmake flag is BUNDLE_PROJECTM_PRESETS
This commit is contained in:
David Sansome 2010-06-10 23:01:22 +00:00
parent f04e4bb6ea
commit 6da08410e9
4 changed files with 21 additions and 16 deletions

View File

@ -152,17 +152,18 @@ endif(BUILD_PROJECTM_STATIC)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libprojectM.pc.in" "${CMAKE_CURRENT_SOURCE_DIR}/libprojectM.pc" @ONLY)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/config.inp.in" "${CMAKE_CURRENT_SOURCE_DIR}/config.inp" @ONLY)
FILE(GLOB presets "presets/*.milk" "presets/*.prjm" "presets/*.tga")
if (APPLE)
foreach (preset ${presets})
get_filename_component(PRESET_NAME ${preset} NAME)
configure_file(
"${preset}"
"${CMAKE_BINARY_DIR}/clementine.app/Contents/Resources/projectm-presets/${PRESET_NAME}"
COPY_ONLY
)
endforeach (preset)
else (APPLE)
INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/clementine/projectm-presets)
endif (APPLE)
if(BUNDLE_PROJECTM_PRESETS)
FILE(GLOB presets "presets/*.milk" "presets/*.prjm" "presets/*.tga")
if (APPLE)
foreach (preset ${presets})
get_filename_component(PRESET_NAME ${preset} NAME)
configure_file(
"${preset}"
"${CMAKE_BINARY_DIR}/clementine.app/Contents/Resources/projectm-presets/${PRESET_NAME}"
COPY_ONLY
)
endforeach (preset)
else (APPLE)
INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/clementine/projectm-presets)
endif (APPLE)
endif(BUNDLE_PROJECTM_PRESETS)

View File

@ -109,6 +109,7 @@ endif(NOT GETTEXT_XGETTEXT_EXECUTABLE)
# Optional bits
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)
if(ENABLE_VISUALISATIONS)
add_subdirectory(3rdparty/libprojectm)
endif(ENABLE_VISUALISATIONS)

3
debian/control vendored
View File

@ -26,7 +26,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
gstreamer0.10-plugins-base,
gstreamer0.10-plugins-good,
gstreamer0.10-alsa | gstreamer0.10-audiosink,
gstreamer0.10-plugins-ugly
gstreamer0.10-plugins-ugly,
libprojectm-data
Description: Clementine is a modern music player and library organiser.
It is largely a port of Amarok 1.4, with some features rewritten to take
advantage of Qt4.

4
debian/rules vendored
View File

@ -4,7 +4,9 @@
configure: configure-stamp
configure-stamp:
dh_testdir
cd bin && cmake .. -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/clementine/usr
cd bin && cmake .. \
-DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/clementine/usr \
-DBUNDLE_PROJECTM_PRESETS=OFF
touch configure-stamp
build: build-stamp