diff options
author | Michael Schuster <michael@schuster.ms> | 2020-03-09 03:48:07 +0300 |
---|---|---|
committer | Michael Schuster <michael@schuster.ms> | 2020-03-09 04:34:55 +0300 |
commit | e833e86da689918ac61a1d77e01d5023eb1c8d0d (patch) | |
tree | 2e6a41099dff01e647638fabd02b18b53764b66a /CMakeLists.txt | |
parent | c812d896aa4835f945ed8de9b4ff5c79c73e1031 (diff) |
Updater: Add CMake option BUILD_UPDATER to make the updater optional
- Default: BUILD_UPDATER = NO
To ease builds for distro packages and contributors (regardless of the specified update URL)
- Enable updater build for Drone CI and AppImage builds
Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c022f6f16..55e846493 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,15 @@ if(NO_MSG_HANDLER) add_definitions(-DNO_MSG_HANDLER=1) endif() +# this option builds the updater +option(BUILD_UPDATER "BUILD_UPDATER" OFF) +if(BUILD_UPDATER) + message("Compiling with updater") + add_definitions(-DBUILD_UPDATER=1) +else() + message("Compiling without updater") +endif() + # this option builds the shell integration option(BUILD_SHELL_INTEGRATION "BUILD_SHELL_INTEGRATION" ON) @@ -172,9 +181,9 @@ if(APPLE) endif() if(BUILD_CLIENT) - if(APPLE) + if(APPLE AND BUILD_UPDATER) find_package(Sparkle) - endif(APPLE) + endif() if(UNIX) find_package(INotify REQUIRED) |