diff options
author | ilya-fedin <[email protected]> | 2022-05-14 00:55:17 +0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-05-13 13:55:17 -0700 |
commit | e0d26ba25ab84f5a04a6ad2ef497cd0e93684a40 (patch) | |
tree | 19e651bb502b06aadd51836ee65e80043e495a4a /CMakeLists.txt | |
parent | af8e756dcb65b5a1744037808d0cfd5d7e574d39 (diff) |
Search the installation data directory (#693)
That allows the logic to work on non-FHS distros like NixOS
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d3945e95..ebfcc4e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,11 @@ option(ALSOFT_UPDATE_BUILD_VERSION "Update git build version info" ON) option(ALSOFT_EAX "Enable legacy EAX extensions" ${WIN32}) +option(ALSOFT_SEARCH_INSTALL_DATADIR "Search the installation data directory" OFF) +if(ALSOFT_SEARCH_INSTALL_DATADIR) + set(ALSOFT_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}) +endif() + if(DEFINED SHARE_INSTALL_DIR) message(WARNING "SHARE_INSTALL_DIR is deprecated. Use the variables provided by the GNUInstallDirs module instead") set(CMAKE_INSTALL_DATADIR "${SHARE_INSTALL_DIR}") |