aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNiels Ole Salscheider <[email protected]>2015-12-19 17:47:07 +0100
committerNiels Ole Salscheider <[email protected]>2015-12-19 17:54:47 +0100
commitd93398a361da94cbb4f0ab07046fbab7c5e94e5d (patch)
tree489a465bde1f5973758f3bb46799dc04a652dfa6 /CMakeLists.txt
parentabd568f9d8bc7200da6b3f7cb1ab0d2d2fbc660b (diff)
Allow to override the share install dir
This is needed for multiarch layouts where the prefix is /usr/${host} but where arch-independet files are installed to /usr/share.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2fb0632b..d6ffe9a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,9 @@ OPTION(ALSOFT_HRTF_DEFS "Install HRTF definition files" ON)
OPTION(ALSOFT_INSTALL "Install headers and libraries" ON)
+set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "The share install dir")
+
+
IF(NOT WIN32)
SET(LIBNAME openal)
ELSE()
@@ -1174,7 +1177,7 @@ ENDIF()
# Install alsoft.conf configuration file
IF(ALSOFT_CONFIG)
INSTALL(FILES alsoftrc.sample
- DESTINATION share/openal
+ DESTINATION ${SHARE_INSTALL_DIR}/openal
)
MESSAGE(STATUS "Installing sample configuration")
MESSAGE(STATUS "")
@@ -1184,7 +1187,7 @@ ENDIF()
IF(ALSOFT_HRTF_DEFS)
INSTALL(FILES hrtf/default-44100.mhr
hrtf/default-48000.mhr
- DESTINATION share/openal/hrtf
+ DESTINATION ${SHARE_INSTALL_DIR}/openal/hrtf
)
MESSAGE(STATUS "Installing HRTF definitions")
MESSAGE(STATUS "")