Add option to disable build of the 'alarm-notify' module
The application “GNOME Evolution” can use several software build modules.
The provided macro “add_simple_module” contains also the following command.
install(TARGETS ${_name}
DESTINATION ${_destination}
One of these modules was designed in the way so that the following command is executed in a selected software build configuration on my Linux system.
elfring@Sonne:~> /usr/bin/pkgconf --variable=uimoduledir libedataserverui-1.2
/usr/lib64/evolution-data-server/ui-modules
This information would usually be applied as an installation directory for a generated software component like “alarm-notify”.
But I find that this dependency is occasionally not needed for special software test installations.
How do you think about to integrate the following adjustments into a source code repository for this purpose?
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18312658de..dc73c0329a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -186,6 +186,8 @@ set(webextensionswebkiteditordir "${webextensionsdir}/webkit-editor")
# Dependencies
# ******************************
+add_printable_option(ENABLE_ALARM_NOTIFY_MODULE "Enable the module “alarm-notify”" ON)
+
include(CodeCoverageGCOV)
include(CheckTarget)
include(DistTargets)
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index 7c7629ab6b..31cfc6b59b 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -62,7 +62,11 @@ add_subdirectory(addressbook)
add_subdirectory(calendar)
add_subdirectory(mail)
add_subdirectory(accounts-window)
+
+if(ENABLE_ALARM_NOTIFY_MODULE)
add_subdirectory(alarm-notify)
+endif()
+
add_subdirectory(backup-restore)
add_subdirectory(book-config-carddav)
add_subdirectory(book-config-google)
Such a module can be excluded then on demand for selected software builds.
Edited by Milan Crha