diff options
author | Robert Adam <dev@robert-adam.de> | 2020-10-24 18:38:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-24 18:38:56 +0300 |
commit | bf9550a68e30b77d2d7b63094022244d26c6fd50 (patch) | |
tree | acdf88703f1ae569b79b363db9842d15d24038cc /CMakeLists.txt | |
parent | ceb4f1afe21c711262fd4392e0050015f24a1d34 (diff) | |
parent | b9b41621c5916f15580813ca84774828835a37dc (diff) |
Merge pull request #4503: BUILD(cmake): Revamp install paths
Installation paths can now be fine-tuned by setting the respective
MUMBLE_INSTALLATION_* variables when invoking cmake.
Additionally some components that only had install rules for a certain
OS are now installed on all OSes as these components should be needed
there as well.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 176c610be..09f0aa4fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,6 @@ list(APPEND CMAKE_MODULE_PATH include(pkg-utils) include(project-utils) -include(GNUInstallDirs) option(tests "Build tests" OFF) @@ -63,21 +62,6 @@ endif() include(compiler) include(os) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - if(UNIX) - # Use default GNU location - set(DEFAULT_LIBDIR "${CMAKE_INSTALL_LIBDIR}/mumble") - else() - # Default to current directory - set(DEFAULT_LIBDIR "./lib/mumble") - endif() -else() - # Use a path relative to the prefix - set(DEFAULT_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/mumble") -endif() - -set(MUMBLE_INSTALL_LIBDIR "${DEFAULT_LIBDIR}" CACHE STRING "The path to which Mumble will install its plugins") - if (64_BIT) set(ARCH "64bit") else() @@ -94,8 +78,10 @@ else() endif() message(STATUS "##################################################") +include(install-paths) + # We have to check for BUILD_TESTING before including CTest as CTest defines this variable -if(DEFINED BUILD_TESTING) +if(DEFINED BUILD_TESTING AND NOT BUILD_TESTING_CHECKED) message(WARNING "Use of option \"BUILD_TESTING\" is deprecated. Use \"tests\" instead.") if(NOT tests) @@ -104,6 +90,8 @@ if(DEFINED BUILD_TESTING) endif() endif() +set(BUILD_TESTING_CHECKED ON INTERNAL CACHE BOOL "Persistent helper variable" FORCE) + if(tests) include(CTest) endif() |