From cf92cf9c0766b03a8096b499e465a6a8cc28b6f1 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 23 Sep 2020 11:00:31 +0200 Subject: BUILD(cmake): Suppress warning on following runs The way the deprecation check for BUILD_TESTING worked, it would issue a warning in any case from the second run onwards (as CTest will set this variable to the cache) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e3fe096c7..cb4780571 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,7 @@ message(STATUS "Build type: ${BUILD_STR}") message(STATUS "##################################################") # 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) @@ -124,6 +124,8 @@ if(DEFINED BUILD_TESTING) endif() endif() +set(BUILD_TESTING_CHECKED ON INTERNAL CACHE BOOL "Persistent helper variable" FORCE) + if(tests) include(CTest) endif() -- cgit v1.2.3 From b9b41621c5916f15580813ca84774828835a37dc Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 23 Sep 2020 12:04:01 +0200 Subject: 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. --- CMakeLists.txt | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index cb4780571..ad5af72df 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) @@ -87,21 +86,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() @@ -114,6 +98,8 @@ message(STATUS "Architecture: ${ARCH}") message(STATUS "Build type: ${BUILD_STR}") message(STATUS "##################################################") +include(install-paths) + # We have to check for BUILD_TESTING before including CTest as CTest defines this variable if(DEFINED BUILD_TESTING AND NOT BUILD_TESTING_CHECKED) message(WARNING "Use of option \"BUILD_TESTING\" is deprecated. Use \"tests\" instead.") -- cgit v1.2.3