aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-20 15:33:44 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-20 15:33:44 +0100
commitbc16de10e7757fc78e0d70fe3c46a9bab67e7873 (patch)
treec03681583d0a4764aa28a23fe5b4b3fd310bb36b /CMakeLists.txt
parentb12fb0e3278c13ea79a4e4354a492f9cfb80ae4f (diff)
parente6f52e9177b1a103961105d9383314b00011a123 (diff)
downloadayatana-indicator-power-bc16de10e7757fc78e0d70fe3c46a9bab67e7873.tar.gz
ayatana-indicator-power-bc16de10e7757fc78e0d70fe3c46a9bab67e7873.tar.bz2
ayatana-indicator-power-bc16de10e7757fc78e0d70fe3c46a9bab67e7873.zip
Merge branch 'tari01-pr/add-lomiri-features-flag'
Attributes GH PR #57: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/57
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt32
1 files changed, 20 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a25fb5..5762fb8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ set(PACKAGE ${CMAKE_PROJECT_NAME})
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)
+option(ENABLE_LOMIRI_FEATURES "Build with Lomiri-specific libraries, schemas and media" OFF)
if(ENABLE_COVERAGE)
set(ENABLE_TESTS ON)
@@ -64,20 +65,26 @@ find_package (PkgConfig REQUIRED)
include (CheckIncludeFile)
include (FindPkgConfig)
-pkg_check_modules(SERVICE_DEPS REQUIRED
- glib-2.0>=2.36
- gio-2.0>=2.36
- gio-unix-2.0>=2.36
- libnotify>=0.7.6
- libayatana-common>=0.9.1)
-
-include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS})
+set(
+ SERVICE_DEPS REQUIRED
+ glib-2.0>=2.36
+ gio-2.0>=2.36
+ gio-unix-2.0>=2.36
+ libnotify>=0.7.6
+ libayatana-common>=0.9.1
+)
-pkg_check_modules(LOMIRI_SCHEMAS lomiri-schemas)
+if (ENABLE_LOMIRI_FEATURES)
+ list (
+ APPEND
+ SERVICE_DEPS
+ lomiri-schemas
+ )
+ add_definitions (-DLOMIRI_FEATURES_ENABLED)
+endif ()
-if(LOMIRI_SCHEMAS_FOUND)
- add_definitions ( -DHAS_LOMIRI_SCHEMAS )
-endif()
+pkg_check_modules (SERVICE_DEPS REQUIRED ${SERVICE_DEPS})
+include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS})
##
## custom targets
@@ -119,3 +126,4 @@ endif ()
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "Unit tests: ${ENABLE_TESTS}")
message(STATUS "Build with -Werror: ${ENABLE_WERROR}")
+message(STATUS "Build with Lomiri features: ${ENABLE_LOMIRI_FEATURES}")