diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-05-01 21:31:48 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-05-01 21:31:48 +0200 |
commit | ddaf9295a99c25292654e29b9391eb9290ad7ad2 (patch) | |
tree | bda7ed421b9705bd86043f609f62b85ca5c7e2e9 | |
parent | 0d153a37a753b9486a06d79332ea00a8f8f983c7 (diff) | |
parent | 155b2f1a2b8ace94ef06f549f73b27a921fd9169 (diff) | |
download | libayatana-common-ddaf9295a99c25292654e29b9391eb9290ad7ad2.tar.gz libayatana-common-ddaf9295a99c25292654e29b9391eb9290ad7ad2.tar.bz2 libayatana-common-ddaf9295a99c25292654e29b9391eb9290ad7ad2.zip |
Merge branch 'tari01-pr/standardise-makefile'
Attributes GH PR #13: https://github.com/AyatanaIndicators/libayatana-common/pull/13
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aaeb591..bd8187d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ project (libayatana-common C CXX) cmake_minimum_required(VERSION 3.13) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) +endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(PROJECT_VERSION "0.9.1") set(PACKAGE ${CMAKE_PROJECT_NAME}) @@ -8,8 +12,8 @@ set(API_VERSION 0) set(ABI_VERSION 0) # Options -option (ENABLE_TESTS "Build the package's automatic tests." OFF) -option (ENABLE_COVERAGE "Generate lcov code coverage reports." OFF) +option(ENABLE_TESTS "Enable all tests and checks" OFF) +option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF) if(ENABLE_COVERAGE) set(ENABLE_TESTS ON) @@ -47,6 +51,9 @@ if (ENABLE_TESTS) include(CTest) enable_testing() add_subdirectory(tests) -else() - message(STATUS "Tests disabled") endif() + +# Display config info + +message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") +message(STATUS "Unit tests: ${ENABLE_TESTS}") |