aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt34
1 files changed, 9 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d323eda..02f48f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,21 +1,14 @@
-project(ayatana-indicator-notifications C CXX)
-cmake_minimum_required(VERSION 3.13)
+cmake_minimum_required (VERSION 3.13)
+project (ayatana-indicator-notifications VERSION 23.10.1 LANGUAGES C CXX)
-set(PROJECT_VERSION "22.2.0")
-set(PACKAGE ${CMAKE_PROJECT_NAME})
+if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ SET (CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE)
+endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Options
-option(ENABLE_TESTS "Enable all tests and checks" OFF)
-option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF)
option(ENABLE_WERROR "Treat all build warnings as errors" OFF)
-
-if(ENABLE_COVERAGE)
- set(ENABLE_TESTS ON)
- set(CMAKE_BUILD_TYPE "Coverage")
-else()
- set(CMAKE_BUILD_TYPE "Release")
-endif()
+set (CMAKE_BUILD_TYPE "Release")
if(ENABLE_WERROR)
add_definitions("-Werror")
@@ -52,7 +45,8 @@ include (FindPkgConfig)
pkg_check_modules(SERVICE_DEPS REQUIRED
glib-2.0>=2.36
gio-2.0>=2.36
- gio-unix-2.0>=2.36)
+ gio-unix-2.0>=2.36
+ libayatana-common>=0.9.3)
include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS})
@@ -60,7 +54,7 @@ include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS})
## custom targets
##
-set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
+set (ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION})
add_custom_target (dist
COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
@@ -79,17 +73,7 @@ add_subdirectory(src)
add_subdirectory(data)
add_subdirectory(po)
-if (ENABLE_TESTS)
- include(CTest)
- enable_testing()
-
- if (ENABLE_COVERAGE)
- find_package(CoverageReport)
- endif()
-endif()
-
# Display config info
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
-message(STATUS "Unit tests: ${ENABLE_TESTS}")
message(STATUS "Build with -Werror: ${ENABLE_WERROR}")