diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-11-06 16:21:43 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-11-06 16:21:43 +0100 |
commit | 1122ae87ef9a085ed705a6a8761c6c7ad0f5dce3 (patch) | |
tree | 07b83db3fa7603ea0bec691b61eb1274c32da385 /CMakeLists.txt | |
parent | fd7a945fec94fc2235f5b45ed2c0e1c8b585a85e (diff) |
CMake: Reuse MIXXX_INSTALL_DATADIR for UNIX_SHARE_PATH
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 855bb663ed..51a1aaf1f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -978,6 +978,21 @@ target_compile_definitions(mixxx-lib PUBLIC $<$<NOT:$<CONFIG:Debug>>:NDEBUG> ) +# +# Installation directories +# +set(MIXXX_INSTALL_BINDIR ".") +set(MIXXX_INSTALL_DATADIR ".") +set(MIXXX_INSTALL_DOCDIR "./doc") +set(MIXXX_INSTALL_LICENSEDIR "./doc") +if (UNIX) + include(GNUInstallDirs) + set(MIXXX_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}") + set(MIXXX_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/mixxx") + set(MIXXX_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}/mixxx") + set(MIXXX_INSTALL_LICENSEDIR "${CMAKE_INSTALL_DATADIR}/licenses/mixxx") +endif() + if(WIN32) target_compile_definitions(mixxx-lib PRIVATE __WINDOWS__) @@ -1016,7 +1031,7 @@ elseif(UNIX) else() target_compile_definitions(mixxx-lib PRIVATE __UNIX__) target_compile_definitions( - mixxx-lib PUBLIC UNIX_SHARE_PATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mixxx") + mixxx-lib PUBLIC UNIX_SHARE_PATH="${MIXXX_INSTALL_DATADIR}") if(CMAKE_SYSTEM_NAME STREQUAL Linux) target_compile_definitions(mixxx-lib PUBLIC __LINUX__) elseif(CMAKE_SYSTEM_NAME MATCHES "^.*BSD$") @@ -1033,18 +1048,6 @@ target_link_libraries(mixxx PUBLIC mixxx-lib) # Installation and Packaging # include(InstallRequiredSystemLibraries) -set(MIXXX_INSTALL_BINDIR ".") -set(MIXXX_INSTALL_DATADIR ".") -set(MIXXX_INSTALL_DOCDIR "./doc") -set(MIXXX_INSTALL_LICENSEDIR "./doc") -if (UNIX) - include(GNUInstallDirs) - set(MIXXX_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}") - set(MIXXX_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/mixxx") - set(MIXXX_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}/mixxx") - set(MIXXX_INSTALL_LICENSEDIR "${CMAKE_INSTALL_DATADIR}/licenses/mixxx") -endif() - install( TARGETS mixxx |