Improve comments in build scripts
This commit is contained in:
parent
b8f19b5cc1
commit
c152152b67
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
|
||||
# metadata
|
||||
# define metadata
|
||||
set(META_PROJECT_NAME syncthingtray)
|
||||
set(META_PROJECT_TYPE application)
|
||||
set(META_APP_AUTHOR "Martchus")
|
||||
|
@ -17,7 +17,7 @@ set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
|
|||
|
||||
project(${META_PROJECT_NAME})
|
||||
|
||||
# disable Dolphin integration under Android, Windows and MacOS by default
|
||||
# disable KDE integration under Android, Windows and MacOS by default
|
||||
if(ANDROID OR WIN32 OR APPLE)
|
||||
set(FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT ON)
|
||||
set(PLASMOID_DISABLED_BY_DEFAULT ON)
|
||||
|
@ -26,7 +26,7 @@ else()
|
|||
set(PLASMOID_DISABLED_BY_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
# options for partial build
|
||||
# add options for partial build
|
||||
option(NO_LIBSYNCTHING "whether building Syncthing itself as a library should be skipped" ON)
|
||||
option(NO_CLI "whether building CLI should be skipped" OFF)
|
||||
option(NO_TRAY "whether building the tray should be skipped" OFF)
|
||||
|
@ -42,11 +42,9 @@ set(CONFIGURATION_PACKAGE_SUFFIX "" CACHE STRING "sets the suffix for find_packa
|
|||
enable_testing()
|
||||
add_subdirectory(connector)
|
||||
add_subdirectory(testhelper)
|
||||
|
||||
if (NOT NO_LIBSYNCTHING)
|
||||
add_subdirectory(libsyncthing)
|
||||
endif()
|
||||
|
||||
link_directories(${LIB_SYNCTHING_CONNECTOR_BINARY_DIR})
|
||||
if(NOT NO_CLI)
|
||||
add_subdirectory(cli)
|
||||
|
|
|
@ -75,7 +75,7 @@ else ()
|
|||
message(STATUS "systemd support disabled")
|
||||
endif ()
|
||||
|
||||
# configure whether the connection should be mocked for test purposes
|
||||
# configure whether the SyncthingConnection class should be mocked for test purposes
|
||||
option(SYNCTHING_CONNECTION_MOCKED
|
||||
"enables mocking the SyncthingConnection class so it will provide only some fixed test data" OFF)
|
||||
if (SYNCTHING_CONNECTION_MOCKED)
|
||||
|
@ -88,7 +88,7 @@ if (SYNCTHING_CONNECTION_MOCKED)
|
|||
message(WARNING "SyncthingConnection class will be mocked")
|
||||
endif ()
|
||||
|
||||
# configure whether the service should be mocked for test purposes
|
||||
# configure whether the SyncthingService class should be mocked for test purposes
|
||||
option(SYNCTHING_SERVICE_MOCKED "enables mocking the SyncthingService class so it will provide some fake status" OFF)
|
||||
if (SYNCTHING_SERVICE_MOCKED)
|
||||
set_property(SOURCE syncthingservice.cpp APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
|
|
|
@ -69,7 +69,7 @@ set(SYNCTHING_PATH
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing"
|
||||
CACHE PATH "path of Syncthing checkout")
|
||||
|
||||
# find Syncthing's assets caveat: newly added assets will not cause CMake to automatically regenerate
|
||||
# find Syncthing's assets (caveat: newly added assets will not cause CMake to automatically regenerate)
|
||||
file(
|
||||
GLOB_RECURSE SRC_FILES_SYNCTHING_ASSETS
|
||||
LIST_DIRECTORIES false
|
||||
|
@ -82,7 +82,7 @@ if (NOT SRC_FILES_SYNCTHING_ASSETS)
|
|||
)
|
||||
endif ()
|
||||
|
||||
# find Syncthing's source code caveat: newly added files will not cause CMake to automatically regenerate
|
||||
# find Syncthing's source code (caveat: newly added files will not cause CMake to automatically regenerate)
|
||||
file(
|
||||
GLOB_RECURSE SRC_FILES_SYNCTHING
|
||||
LIST_DIRECTORIES false
|
||||
|
@ -121,7 +121,7 @@ if (DEFINED $ENV{BUILD_STAMP})
|
|||
set(GO_LINKER_FLAGS "${GO_LINKER_FLAGS} -X github.com/syncthing/syncthing/lib/build.Stamp=$ENV{BUILD_STAMP}")
|
||||
endif ()
|
||||
|
||||
# generate Syncthing's assets: don't set GOARCH/GOOS here, this is supposed to run on the host
|
||||
# generate Syncthing's assets (not setting GOARCH/GOOS here, this is supposed to run on the host)
|
||||
add_custom_command(
|
||||
OUTPUT "${SYNCTHING_PATH}/lib/auto/gui.files.go"
|
||||
COMMAND "GOPATH=${GO_DEVELOPMENT_PATH}" "GO111MODULE=on" "${GO_BIN}" run ./script/genassets.go gui >
|
||||
|
@ -144,7 +144,7 @@ add_custom_command(
|
|||
WORKING_DIRECTORY "${SYNCTHING_PATH}"
|
||||
COMMENT "Building Syncthing itself")
|
||||
|
||||
# find c++utilities
|
||||
# find c++utilities to use CMake modules and headers from it privately
|
||||
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
||||
list(APPEND CMAKE_MODULE_PATH ${CPP_UTILITIES_MODULE_DIRS})
|
||||
if (CPP_UTILITIES_SOURCE_DIR)
|
||||
|
@ -185,8 +185,8 @@ include(TestTarget)
|
|||
include(Doxygen)
|
||||
include(ConfigHeader)
|
||||
|
||||
# create install target for static libsyncthinginternal.a if we're also creating a static libsyncthing.a note: Not possible
|
||||
# to add syncthinginternal to BUNDLED_TARGETS because it is an import library which apparently can not be exported.
|
||||
# create install target for static libsyncthinginternal.a if we're also creating a static libsyncthing.a (note: It is not
|
||||
# possible to add syncthinginternal to BUNDLED_TARGETS because it is an import library which apparently can not be exported.)
|
||||
if (NOT BUILD_SHARED_LIBS
|
||||
AND NOT META_NO_INSTALL_TARGETS
|
||||
AND ENABLE_INSTALL_TARGETS)
|
||||
|
|
Loading…
Reference in New Issue