Commit 88ee6cc1 authored by Alexandre Lision's avatar Alexandre Lision

cmake: add link to ringtone folder

This allows to package ringtones when daemon is installed in another
prefix

Change-Id: I4a49957f81e4bebf80c8a657ebf958d661a53fd4
Tuleap: #652
parent d5d4dff4
......@@ -243,13 +243,23 @@ SET_SOURCE_FILES_PROPERTIES(${ring_ICONS} PROPERTIES
SET_SOURCE_FILES_PROPERTIES(Credits.rtf PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
# package all ringtones in share/ring/ringtones/
FILE(GLOB RINGTONE_LIST ${CMAKE_INSTALL_PREFIX}/share/ring/ringtones/*)
FOREACH(RINGTONE ${RINGTONE_LIST})
GET_FILENAME_COMPONENT(FILE_PATH ${RINGTONE} ABSOLUTE)
SET(ring_RINGTONES ${ring_RINGTONES} ${FILE_PATH})
ENDFOREACH()
# package ringtones
IF(NOT IS_DIRECTORY ${RINGTONE_DIR})
MESSAGE("No ringtone folder provided, use RINGTONE_DIR to specify one")
SET(RINGTONE_DIR ${CMAKE_INSTALL_PREFIX}/share/ring/ringtones)
MESSAGE("Trying ${RINGTONE_DIR}")
ENDIF()
IF(IS_DIRECTORY ${RINGTONE_DIR})
FILE(GLOB RINGTONE_LIST ${RINGTONE_DIR}/*)
FOREACH(RINGTONE ${RINGTONE_LIST})
MESSAGE("Adding ringtone ${RINGTONE}")
GET_FILENAME_COMPONENT(FILE_PATH ${RINGTONE} ABSOLUTE)
SET(ring_RINGTONES ${ring_RINGTONES} ${FILE_PATH})
ENDFOREACH()
ELSE()
MESSAGE("${RINGTONE_DIR} does not exist or is not readable")
ENDIF()
SET_SOURCE_FILES_PROPERTIES(${ring_RINGTONES}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources/ringtones)
......
......@@ -61,6 +61,9 @@ Notes:
By default the client version is specified in CMakeLists.txt but it can be
overriden by specifying -DRING_VERSION=<num> in the cmake command line.
You can specify a custom ringtone folder containing audio files (only)
with -DRINGTONE_DIR option
Debugging
==================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment