aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-12-06 10:17:08 +0100
committerRobert Tari <robert@tari.in>2021-12-09 12:50:31 +0100
commit078be8ba2186cf095a2f4c162665a4a265cab3d6 (patch)
treedc3fc73cf009f94791158320baee6251c7e64038 /CMakeLists.txt
parenta1d1bd53d739bc1b559df880c48da186ccd44800 (diff)
downloadlibayatana-common-078be8ba2186cf095a2f4c162665a4a265cab3d6.tar.gz
libayatana-common-078be8ba2186cf095a2f4c162665a4a265cab3d6.tar.bz2
libayatana-common-078be8ba2186cf095a2f4c162665a4a265cab3d6.zip
Add ENABLE_LOMIRI_FEATURES switch
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 15 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b98b697..dbb9b50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,7 @@ set(ABI_VERSION 0)
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)
@@ -39,17 +40,22 @@ set (CMAKE_INSTALL_FULL_PKGLIBEXECDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_
find_package (PkgConfig REQUIRED)
include (FindPkgConfig)
-pkg_check_modules(GLIB REQUIRED
+set (
+ DEPS
glib-2.0>=2.36
gio-2.0>=2.36
)
-include_directories (${GLIB_INCLUDE_DIRS})
-pkg_check_modules(
- URLDISPATCHER
- lomiri-url-dispatcher>=0
-)
-include_directories(${URLDISPATCHER_INCLUDE_DIRS})
+if (ENABLE_LOMIRI_FEATURES)
+ list (
+ APPEND
+ DEPS
+ lomiri-url-dispatcher>=0
+ )
+endif ()
+
+pkg_check_modules (DEPS REQUIRED ${DEPS})
+include_directories (${DEPS_INCLUDE_DIRS})
# for GIR and Vala bindings
find_package (GObjectIntrospection QUIET)
@@ -91,3 +97,5 @@ if (INTROSPECTION_FOUND)
else()
message(STATUS "Build GObjectIntrospection: NO")
endif()
+
+message(STATUS "Build with Lomiri features: ${ENABLE_LOMIRI_FEATURES}")