aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-04-29 18:32:36 +0200
committerRobert Tari <robert@tari.in>2021-04-29 18:32:36 +0200
commit155b2f1a2b8ace94ef06f549f73b27a921fd9169 (patch)
treebda7ed421b9705bd86043f609f62b85ca5c7e2e9 /CMakeLists.txt
parent0d153a37a753b9486a06d79332ea00a8f8f983c7 (diff)
downloadlibayatana-common-155b2f1a2b8ace94ef06f549f73b27a921fd9169.tar.gz
libayatana-common-155b2f1a2b8ace94ef06f549f73b27a921fd9169.tar.bz2
libayatana-common-155b2f1a2b8ace94ef06f549f73b27a921fd9169.zip
CMakeLists.txt: Use our standardised CMake bits
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
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}")