From e0841e4958f495ffcc244a74ef7d793b34efc5a2 Mon Sep 17 00:00:00 2001 From: Gerhard Gappmeier Date: Thu, 8 Nov 2018 18:15:04 +0100 Subject: [PATCH] Add CMake option to disable GUI build --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d650b23797..7bbf6e4dbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,9 @@ option(BUILD_CLIENT "BUILD_CLIENT" ON) # this option creates only libocsync and libowncloudsync (NOTE: BUILD_CLIENT needs to be on) option(BUILD_LIBRARIES_ONLY "BUILD_LIBRARIES_ONLY" OFF) +# build the GUI component, when disabled only owncloudcmd is built +option(BUILD_GUI "BUILD_GUI" ON) + # When this option is enabled, 5xx errors are not added to the blacklist # Normally you don't want to enable this option because if a particular file # triggers a bug on the server, you want the file to be blacklisted. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6db99a49e4..9c9946a754 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,9 @@ endif() add_subdirectory(csync) add_subdirectory(libsync) if (NOT BUILD_LIBRARIES_ONLY) - add_subdirectory(gui) + if (BUILD_GUI) + add_subdirectory(gui) + endif() add_subdirectory(cmd) if (WITH_CRASHREPORTER)