From 078be8ba2186cf095a2f4c162665a4a265cab3d6 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Mon, 6 Dec 2021 10:17:08 +0100 Subject: Add ENABLE_LOMIRI_FEATURES switch --- CMakeLists.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') 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}") -- cgit v1.2.3