aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-11-14 10:58:52 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-12-15 20:27:19 +0100
commitf26dba318ecc765f41b909e3e0dde470988f738c (patch)
treea1e96036ace3acfed6c86b436ce32c71ded4abe6 /CMakeLists.txt
parent796525b933045a6477f57a60aff394cdd5f62a32 (diff)
downloadayatana-indicator-display-f26dba318ecc765f41b909e3e0dde470988f738c.tar.gz
ayatana-indicator-display-f26dba318ecc765f41b909e3e0dde470988f738c.tar.bz2
ayatana-indicator-display-f26dba318ecc765f41b909e3e0dde470988f738c.zip
Allow building with(out) Lomiri features
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34fda26..ba7f022 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,7 @@ set(SERVICE_EXEC "${PACKAGE}-service")
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)
@@ -65,12 +66,18 @@ find_package(PkgConfig REQUIRED)
# glib...
set(GLIB_MINIMUM 2.36)
-set (SERVICE_DEPS libayatana-common>=0.9.3 gio-unix-2.0>=${GLIB_MINIMUM} glib-2.0>=${GLIB_MINIMUM} gudev-1.0)
+set (SERVICE_DEPS libayatana-common>=0.9.3 gio-unix-2.0>=${GLIB_MINIMUM} glib-2.0>=${GLIB_MINIMUM})
if (ENABLE_TESTS)
list (APPEND SERVICE_DEPS properties-cpp>=0.0.1)
endif ()
+if (ENABLE_LOMIRI_FEATURES)
+ find_package(Qt5Core REQUIRED)
+ list (APPEND SERVICE_DEPS gudev-1.0)
+ add_definitions (-DLOMIRI_FEATURES_ENABLED)
+endif ()
+
pkg_check_modules (SERVICE_DEPS REQUIRED ${SERVICE_DEPS})
include_directories (SYSTEM
@@ -115,3 +122,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}")