Add CMake option to disable GUI build
authorGerhard Gappmeier <gerhard.gappmeier@ascolab.com>
Thu, 8 Nov 2018 17:15:04 +0000 (18:15 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:18 +0000 (10:58 +0100)
CMakeLists.txt
src/CMakeLists.txt

index 383f00ae2362e6216ff46a30a5fecf8321b77616..b505b8e229ab0b9f92bbfb98b3c5fe62fc17ed4f 100644 (file)
@@ -160,6 +160,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 nextcloudcmd 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.
index 00eef6c876bfda31131353365e3b8ada22d2e572..b3658c98bc8355c7e726393172520ba3cb1de2f1 100644 (file)
@@ -60,7 +60,9 @@ add_subdirectory(csync)
 add_subdirectory(libsync)
 if (NOT BUILD_LIBRARIES_ONLY)
     add_subdirectory(cmd)
-    add_subdirectory(gui)
+    if (BUILD_GUI)
+        add_subdirectory(gui)
+    endif()
 
     if (WITH_CRASHREPORTER)
         add_subdirectory(3rdparty/libcrashreporter-qt)