aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-27 07:30:00 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-27 07:30:00 +0200
commitb0d110bac6f1f10a949abb7f985ea4becda75488 (patch)
tree57388c274b5889ed64245a02d5f255c7c9143c7f
parent00cb60a120a4ddaa00cd8b2852b8d88e0a999261 (diff)
parentab1fb44f94511de31ad319ce22cdb7a8f9397e8a (diff)
downloadayatana-indicator-datetime-b0d110bac6f1f10a949abb7f985ea4becda75488.tar.gz
ayatana-indicator-datetime-b0d110bac6f1f10a949abb7f985ea4becda75488.tar.bz2
ayatana-indicator-datetime-b0d110bac6f1f10a949abb7f985ea4becda75488.zip
Merge branch 'tari01-pr/ayatana-standard-cmake'
Attributes GH PR #40: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/40
-rw-r--r--CMakeLists.txt18
-rw-r--r--cmake/GdbusCodegen.cmake2
2 files changed, 16 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dce8c96..1ff9bf7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
project (ayatana-indicator-datetime C CXX)
-cmake_minimum_required (VERSION 2.8.9)
+cmake_minimum_required (VERSION 3.13)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
@@ -9,8 +9,15 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (PROJECT_VERSION "0.8.3")
set (PACKAGE ${CMAKE_PROJECT_NAME})
-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)
+ set(CMAKE_BUILD_TYPE "Coverage")
+else()
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
##
## GNU standard installation directories
@@ -134,3 +141,8 @@ add_subdirectory(po)
if (${ENABLE_TESTS})
add_subdirectory(tests)
endif ()
+
+# Display config info
+
+message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
+message(STATUS "Unit tests: ${ENABLE_TESTS}")
diff --git a/cmake/GdbusCodegen.cmake b/cmake/GdbusCodegen.cmake
index ddb2995..5261ba8 100644
--- a/cmake/GdbusCodegen.cmake
+++ b/cmake/GdbusCodegen.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.13)
if(POLICY CMP0011)
cmake_policy(SET CMP0011 NEW)
endif(POLICY CMP0011)