Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2017-09-22 11:32:38 +0300
committerckamm <mail@ckamm.de>2017-09-27 10:13:44 +0300
commitca4ad58a06fac3db38e5f6238a84fa26516cc7bc (patch)
tree3929615ec36a02dd9cf908cae161557fe17b7742 /CMakeLists.txt
parent89df8fb6927b8f787ba6ca414b8adc2a32b8283d (diff)
Packaging: Add options for fine-grained builds #5957
Extracted and adjusted from packaging.diff by @jnweiger and @dschmidt
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt78
1 files changed, 50 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 123b3f85d..c8ea19820 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,7 +129,22 @@ if(NO_MSG_HANDLER)
add_definitions(-DNO_MSG_HANDLER=1)
endif()
-# this option creates only libocsync and libowncloudsync
+# this option builds the shell integration
+option(BUILD_SHELL_INTEGRATION "BUILD_SHELL_INTEGRATION" ON)
+
+# this option builds/installs the generic shell integration icons
+option(BUILD_SHELL_INTEGRATION_ICONS "BUILD_SHELL_INTEGRATION_ICONS" ON)
+
+# this options builds the dolphin integration plugin
+option(BUILD_SHELL_INTEGRATION_DOLPHIN "BUILD_SHELL_INTEGRATION_DOLPHIN" ON)
+
+# this options builds the nautilus (like) integration plugins
+option(BUILD_SHELL_INTEGRATION_NAUTILUS "BUILD_SHELL_INTEGRATION_NAUTILUS" ON)
+
+# this option builds the client
+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)
# When this option is enabled, 5xx errors are not added to the blacklist
@@ -162,28 +177,30 @@ if(APPLE)
set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
endif()
-if(APPLE)
- find_package(Sparkle)
-endif(APPLE)
-
-if(UNIX)
- find_package(INotify REQUIRED)
-else()
- find_package(INotify)
-endif()
-find_package(Sphinx)
-find_package(PdfLatex)
+if(BUILD_CLIENT)
+ if(APPLE)
+ find_package(Sparkle)
+ endif(APPLE)
-find_package(SQLite3 3.8.0 REQUIRED)
-# On some OS, we want to use our own, not the system sqlite
-if (USE_OUR_OWN_SQLITE3)
- include_directories(BEFORE ${SQLITE3_INCLUDE_DIR})
- if (WIN32)
- add_definitions(-DSQLITE_API=__declspec\(dllimport\))
+ if(UNIX)
+ find_package(INotify REQUIRED)
+ else()
+ find_package(INotify)
+ endif()
+ find_package(Sphinx)
+ find_package(PdfLatex)
+
+ find_package(SQLite3 3.8.0 REQUIRED)
+ # On some OS, we want to use our own, not the system sqlite
+ if (USE_OUR_OWN_SQLITE3)
+ include_directories(BEFORE ${SQLITE3_INCLUDE_DIR})
+ if (WIN32)
+ add_definitions(-DSQLITE_API=__declspec\(dllimport\))
+ endif()
endif()
-endif()
-find_package(ZLIB)
+ find_package(ZLIB)
+endif()
if (NOT DEFINED APPLICATION_ICON_NAME)
set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME})
@@ -223,13 +240,18 @@ set(TRANSLATIONS ${TRANS_FILES})
# Make sure we set this before recursing into child folders.
set(WITH_TESTING ${UNIT_TESTING})
-add_subdirectory(src)
-if(NOT BUILD_LIBRARIES_ONLY)
-add_subdirectory(shell_integration)
-add_subdirectory(doc)
-add_subdirectory(doc/dev)
-add_subdirectory(admin)
-endif(NOT BUILD_LIBRARIES_ONLY)
+if(BUILD_CLIENT)
+ add_subdirectory(src)
+ if(NOT BUILD_LIBRARIES_ONLY)
+ add_subdirectory(doc)
+ add_subdirectory(doc/dev)
+ add_subdirectory(admin)
+ endif(NOT BUILD_LIBRARIES_ONLY)
+endif()
+
+if(BUILD_SHELL_INTEGRATION)
+ add_subdirectory(shell_integration)
+endif()
if(UNIT_TESTING)
include(CTest)
@@ -243,7 +265,7 @@ configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
if(BUILD_OWNCLOUD_OSX_BUNDLE)
install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
configure_file(sync-exclude.lst bin/${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
-else()
+elseif(BUILD_CLIENT)
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)
endif()