Apply cmake-format v0.6.0

This commit is contained in:
Martchus 2019-11-30 18:24:19 +01:00
parent 69e061cba7
commit 4b5a8efa3e
6 changed files with 89 additions and 122 deletions

View File

@ -58,16 +58,9 @@ else ()
endif () endif ()
option(SYSTEMD_SUPPORT "enables support for controlling Syncthing systemd service" ${ENABLE_SYSTEMD_SUPPORT_BY_DEFAULT}) option(SYSTEMD_SUPPORT "enables support for controlling Syncthing systemd service" ${ENABLE_SYSTEMD_SUPPORT_BY_DEFAULT})
if (SYSTEMD_SUPPORT) if (SYSTEMD_SUPPORT)
list(APPEND DBUS_FILES list(APPEND DBUS_FILES org.freedesktop.DBus.Properties.xml org.freedesktop.login1.LoginManager.xml
org.freedesktop.DBus.Properties.xml org.freedesktop.systemd1.Manager.xml org.freedesktop.systemd1.Service.xml org.freedesktop.systemd1.Unit.xml)
org.freedesktop.login1.LoginManager.xml set_source_files_properties(org.freedesktop.systemd1.Manager.xml PROPERTIES INCLUDE syncthingservice.h)
org.freedesktop.systemd1.Manager.xml
org.freedesktop.systemd1.Service.xml
org.freedesktop.systemd1.Unit.xml)
set_source_files_properties(org.freedesktop.systemd1.Manager.xml
PROPERTIES
INCLUDE
syncthingservice.h)
list(APPEND META_PUBLIC_COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_SUPPORT_SYSTEMD) list(APPEND META_PUBLIC_COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_SUPPORT_SYSTEMD)
message(STATUS "systemd support enabled") message(STATUS "systemd support enabled")
else () else ()
@ -79,30 +72,31 @@ option(SYNCTHING_CONNECTION_MOCKED
"enables mocking the SyncthingConnection class so it will provide only some fixed test data" OFF) "enables mocking the SyncthingConnection class so it will provide only some fixed test data" OFF)
if (SYNCTHING_CONNECTION_MOCKED) if (SYNCTHING_CONNECTION_MOCKED)
list(APPEND SRC_FILES syncthingconnectionmockhelpers.h syncthingconnectionmockhelpers.cpp) list(APPEND SRC_FILES syncthingconnectionmockhelpers.h syncthingconnectionmockhelpers.cpp)
set_property(SOURCE syncthingconnection.cpp set_property(
syncthingconnection_requests.cpp SOURCE syncthingconnection.cpp syncthingconnection_requests.cpp syncthingconnectionmockhelpers.h
syncthingconnectionmockhelpers.h syncthingconnectionmockhelpers.cpp
syncthingconnectionmockhelpers.cpp APPEND
APPEND PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_CONNECTION_MOCKED)
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_CONNECTION_MOCKED)
message(WARNING "SyncthingConnection class will be mocked") message(WARNING "SyncthingConnection class will be mocked")
endif () endif ()
# configure whether the service should be mocked for test purposes # configure whether the service should be mocked for test purposes
option(SYNCTHING_SERVICE_MOCKED "enables mocking the SyncthingService class so it will provide some fake status" OFF) option(SYNCTHING_SERVICE_MOCKED "enables mocking the SyncthingService class so it will provide some fake status" OFF)
if (SYNCTHING_SERVICE_MOCKED) if (SYNCTHING_SERVICE_MOCKED)
set_property(SOURCE syncthingservice.cpp set_property(
APPEND SOURCE syncthingservice.cpp
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_SERVICE_MOCKED) APPEND
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_SERVICE_MOCKED)
message(WARNING "SyncthingService class will be mocked") message(WARNING "SyncthingService class will be mocked")
endif () endif ()
# configure whether events should be logged # configure whether events should be logged
option(SYNCTHING_CONNECTION_LOG_SYNCTHING_EVENTS "enables logging event data to stdout (enable only for debugging!)" OFF) option(SYNCTHING_CONNECTION_LOG_SYNCTHING_EVENTS "enables logging event data to stdout (enable only for debugging!)" OFF)
if (SYNCTHING_CONNECTION_LOG_SYNCTHING_EVENTS) if (SYNCTHING_CONNECTION_LOG_SYNCTHING_EVENTS)
set_property(SOURCE syncthingconnection.cpp syncthingconnection_requests.cpp set_property(
APPEND SOURCE syncthingconnection.cpp syncthingconnection_requests.cpp
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_SYNCTHING_EVENTS) APPEND
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_SYNCTHING_EVENTS)
message(WARNING "SyncthingConnection class will log event data to stdout") message(WARNING "SyncthingConnection class will log event data to stdout")
endif () endif ()
@ -110,9 +104,10 @@ endif ()
option(SYNCTHING_CONNECTION_LOG_API_CALLS option(SYNCTHING_CONNECTION_LOG_API_CALLS
"enables logging API calls done by the SyncthingConnector (enable only for debugging!)" OFF) "enables logging API calls done by the SyncthingConnector (enable only for debugging!)" OFF)
if (SYNCTHING_CONNECTION_LOG_API_CALLS) if (SYNCTHING_CONNECTION_LOG_API_CALLS)
set_property(SOURCE syncthingconnection_requests.cpp set_property(
APPEND SOURCE syncthingconnection_requests.cpp
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_API_CALLS) APPEND
PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME_UPPER}_LOG_API_CALLS)
message(WARNING "SyncthingConnection class will log API calls data to stdout") message(WARNING "SyncthingConnection class will log API calls data to stdout")
endif () endif ()

View File

@ -6,18 +6,10 @@ set(META_PROJECT_TYPE qtplugin)
set(META_QT5_VERSION 5.8) set(META_QT5_VERSION 5.8)
# add project files # add project files
set(HEADER_FILES set(HEADER_FILES syncthingmenuaction.h syncthinginfoaction.h syncthingdiractions.h syncthingfileitemactionstaticdata.h
syncthingmenuaction.h syncthingfileitemaction.h)
syncthinginfoaction.h set(SRC_FILES syncthingmenuaction.cpp syncthinginfoaction.cpp syncthingdiractions.cpp syncthingfileitemactionstaticdata.cpp
syncthingdiractions.h syncthingfileitemaction.cpp)
syncthingfileitemactionstaticdata.h
syncthingfileitemaction.h)
set(SRC_FILES
syncthingmenuaction.cpp
syncthinginfoaction.cpp
syncthingdiractions.cpp
syncthingfileitemactionstaticdata.cpp
syncthingfileitemaction.cpp)
set(TS_FILES translations/${META_PROJECT_NAME}_cs_CZ.ts translations/${META_PROJECT_NAME}_de_DE.ts set(TS_FILES translations/${META_PROJECT_NAME}_cs_CZ.ts translations/${META_PROJECT_NAME}_de_DE.ts
translations/${META_PROJECT_NAME}_en_US.ts) translations/${META_PROJECT_NAME}_en_US.ts)
@ -39,11 +31,7 @@ use_syncthingmodel()
# link also explicitely against the following Qt and KF modules # link also explicitely against the following Qt and KF modules
list(APPEND ADDITIONAL_QT_MODULES Network) list(APPEND ADDITIONAL_QT_MODULES Network)
list(APPEND ADDITIONAL_KF_MODULES KIO) list(APPEND ADDITIONAL_KF_MODULES KIO)
set(KIO_MODULE_TARGETS set(KIO_MODULE_TARGETS KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets KF5::KIONTLM)
KF5::KIOCore
KF5::KIOFileWidgets
KF5::KIOWidgets
KF5::KIONTLM)
# include modules to apply configuration # include modules to apply configuration
include(BasicConfig) include(BasicConfig)
@ -53,4 +41,7 @@ include(WindowsResources)
include(LibraryTarget) include(LibraryTarget)
include(ConfigHeader) include(ConfigHeader)
install(FILES ${META_PROJECT_NAME}.desktop DESTINATION "share/kservices5" COMPONENT desktop) install(
FILES ${META_PROJECT_NAME}.desktop
DESTINATION "share/kservices5"
COMPONENT desktop)

View File

@ -22,7 +22,9 @@ if (NOT GO_BIN)
endif () endif ()
# determine GOARCH for target # determine GOARCH for target
set(GO_TARGET_ARCH_OVERRIDE "" CACHE STRING "overrides the 'GOARCH' variable") set(GO_TARGET_ARCH_OVERRIDE
""
CACHE STRING "overrides the 'GOARCH' variable")
if (GO_TARGET_ARCH_OVERRIDE) if (GO_TARGET_ARCH_OVERRIDE)
set(GO_TARGET_ARCH "${GO_TARGET_ARCH_OVERRIDE}") set(GO_TARGET_ARCH "${GO_TARGET_ARCH_OVERRIDE}")
elseif (NOT CMAKE_CROSSCOMPILING) elseif (NOT CMAKE_CROSSCOMPILING)
@ -37,7 +39,9 @@ else ()
message(FATAL_ERROR "Unable to auto-determine GOARCH. Please set GO_TARGET_ARCH_OVERRIDE manually.") message(FATAL_ERROR "Unable to auto-determine GOARCH. Please set GO_TARGET_ARCH_OVERRIDE manually.")
endif () endif ()
# determine GOOS for target # determine GOOS for target
set(GO_TARGET_OS_OVERRIDE "" CACHE STRING "overrides the 'GOOS' variable") set(GO_TARGET_OS_OVERRIDE
""
CACHE STRING "overrides the 'GOOS' variable")
if (GO_TARGET_OS_OVERRIDE) if (GO_TARGET_OS_OVERRIDE)
set(GO_TARGET_OS "${GO_TARGET_OS_OVERRIDE}") set(GO_TARGET_OS "${GO_TARGET_OS_OVERRIDE}")
elseif (NOT CMAKE_CROSSCOMPILING) elseif (NOT CMAKE_CROSSCOMPILING)
@ -58,38 +62,38 @@ endif ()
message(STATUS "Using GOOS=${GO_TARGET_OS} and GOARCH=${GO_TARGET_ARCH}") message(STATUS "Using GOOS=${GO_TARGET_OS} and GOARCH=${GO_TARGET_ARCH}")
# locate the Syncthing checkout # locate the Syncthing checkout
set(GO_DEVELOPMENT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/go" CACHE PATH "the 'GOPATH'") set(GO_DEVELOPMENT_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/go"
CACHE PATH "the 'GOPATH'")
set(SYNCTHING_PATH set(SYNCTHING_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing" "${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing"
CACHE PATH "path of Syncthing checkout") 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 file(
LIST_DIRECTORIES false GLOB_RECURSE SRC_FILES_SYNCTHING_ASSETS
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" LIST_DIRECTORIES false
"${SYNCTHING_PATH}/gui/*") RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"${SYNCTHING_PATH}/gui/*")
if (NOT SRC_FILES_SYNCTHING_ASSETS) if (NOT SRC_FILES_SYNCTHING_ASSETS)
message( message(
FATAL_ERROR FATAL_ERROR
"No asset files found in Syncthing checkout \"${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing\"." "No asset files found in Syncthing checkout \"${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing\"."
) )
endif () 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 file(
LIST_DIRECTORIES false GLOB_RECURSE SRC_FILES_SYNCTHING
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" LIST_DIRECTORIES false
"${SYNCTHING_PATH}/c-bindings/*.go" RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
"${SYNCTHING_PATH}/c-bindings/*.h" "${SYNCTHING_PATH}/c-bindings/*.go" "${SYNCTHING_PATH}/c-bindings/*.h" "${SYNCTHING_PATH}/c-bindings/*.c"
"${SYNCTHING_PATH}/c-bindings/*.c" "${SYNCTHING_PATH}/lib/*.go" "${SYNCTHING_PATH}/lib/*.h" "${SYNCTHING_PATH}/lib/*.c")
"${SYNCTHING_PATH}/lib/*.go"
"${SYNCTHING_PATH}/lib/*.h"
"${SYNCTHING_PATH}/lib/*.c")
if (NOT SRC_FILES_SYNCTHING) if (NOT SRC_FILES_SYNCTHING)
message( message(
FATAL_ERROR FATAL_ERROR
"No *.go files found in Syncthing checkout \"${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing\"." "No *.go files found in Syncthing checkout \"${CMAKE_CURRENT_SOURCE_DIR}/go/src/github.com/syncthing/syncthing\"."
) )
endif () endif ()
list(APPEND SRC_FILES_SYNCTHING "${SYNCTHING_PATH}/lib/auto/gui.files.go") list(APPEND SRC_FILES_SYNCTHING "${SYNCTHING_PATH}/lib/auto/gui.files.go")
message(STATUS "Syncthing's go files: ${SRC_FILES_SYNCTHING}") message(STATUS "Syncthing's go files: ${SRC_FILES_SYNCTHING}")
@ -118,47 +122,27 @@ if (DEFINED $ENV{BUILD_STAMP})
endif () endif ()
# generate Syncthing's assets: don't set GOARCH/GOOS here, this is supposed to run on the host # generate Syncthing's assets: don't set GOARCH/GOOS here, this is supposed to run on the host
add_custom_command(OUTPUT "${SYNCTHING_PATH}/lib/auto/gui.files.go" add_custom_command(
COMMAND "GOPATH=${GO_DEVELOPMENT_PATH}" OUTPUT "${SYNCTHING_PATH}/lib/auto/gui.files.go"
"GO111MODULE=on" COMMAND
"${GO_BIN}" "GOPATH=${GO_DEVELOPMENT_PATH}" "GO111MODULE=on" "${GO_BIN}" run ./script/genassets.go gui > lib/auto/gui.files.go
run DEPENDS ${SRC_FILES_SYNCTHING_ASSETS}
./script/genassets.go WORKING_DIRECTORY "${SYNCTHING_PATH}"
gui COMMENT "Building Syncthing's assets")
>
lib/auto/gui.files.go
DEPENDS ${SRC_FILES_SYNCTHING_ASSETS}
WORKING_DIRECTORY "${SYNCTHING_PATH}"
COMMENT "Building Syncthing's assets")
# compile Syncthing as static library # compile Syncthing as static library
set(SYNCTHINGINTERNAL_LIBRARY_PATH "${CMAKE_CURRENT_BINARY_DIR}/libsyncthinginternal.a") set(SYNCTHINGINTERNAL_LIBRARY_PATH "${CMAKE_CURRENT_BINARY_DIR}/libsyncthinginternal.a")
set(SYNCTHINGINTERNAL_HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/libsyncthinginternal.h") set(SYNCTHINGINTERNAL_HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/libsyncthinginternal.h")
add_custom_command(OUTPUT "${SYNCTHINGINTERNAL_LIBRARY_PATH}" "${SYNCTHINGINTERNAL_HEADER_PATH}" add_custom_command(
COMMAND "CC=${CMAKE_C_COMPILER}" OUTPUT "${SYNCTHINGINTERNAL_LIBRARY_PATH}" "${SYNCTHINGINTERNAL_HEADER_PATH}"
"CXX=${CMAKE_CXX_COMPILER}" COMMAND
"AR=${CMAKE_C_COMPILER_AR}" "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "AR=${CMAKE_C_COMPILER_AR}" "GOOS=${GO_TARGET_OS}"
"GOOS=${GO_TARGET_OS}" "GOARCH=${GO_TARGET_ARCH}" "CGO_ENABLED=1" "GO111MODULE=on" "GOPATH=${GO_DEVELOPMENT_PATH}" "${GO_BIN}" build -v
"GOARCH=${GO_TARGET_ARCH}" -buildmode c-archive -o "${SYNCTHINGINTERNAL_LIBRARY_PATH}" -ldflags "${GO_LINKER_FLAGS}" ./c-bindings &&
"CGO_ENABLED=1" "${CMAKE_RANLIB}" "${SYNCTHINGINTERNAL_LIBRARY_PATH}"
"GO111MODULE=on" DEPENDS ${SRC_FILES_SYNCTHING}
"GOPATH=${GO_DEVELOPMENT_PATH}" WORKING_DIRECTORY "${SYNCTHING_PATH}"
"${GO_BIN}" COMMENT "Building Syncthing itself")
build
-v
-buildmode
c-archive
-o
"${SYNCTHINGINTERNAL_LIBRARY_PATH}"
-ldflags
"${GO_LINKER_FLAGS}"
./c-bindings
&&
"${CMAKE_RANLIB}"
"${SYNCTHINGINTERNAL_LIBRARY_PATH}"
DEPENDS ${SRC_FILES_SYNCTHING}
WORKING_DIRECTORY "${SYNCTHING_PATH}"
COMMENT "Building Syncthing itself")
# find c++utilities # find c++utilities
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED) find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
@ -186,9 +170,10 @@ elseif (UNIX)
endif () endif ()
foreach (LIBRARY ${SYNCTHING_INTERNAL_LIBS}) foreach (LIBRARY ${SYNCTHING_INTERNAL_LIBS})
find_library(SYNCTHING_INTERNAL_LIBRARY_PATH_${LIBRARY} ${LIBRARY}) find_library(SYNCTHING_INTERNAL_LIBRARY_PATH_${LIBRARY} ${LIBRARY})
set_property(TARGET syncthinginternal set_property(
APPEND TARGET syncthinginternal
PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES ${SYNCTHING_INTERNAL_LIBRARY_PATH_${LIBRARY}}) APPEND
PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES ${SYNCTHING_INTERNAL_LIBRARY_PATH_${LIBRARY}})
endforeach () endforeach ()
# depend on that imported target # depend on that imported target
@ -204,6 +189,11 @@ include(ConfigHeader)
# create install target for static libsyncthinginternal.a if we're also creating a static libsyncthing.a note: Not possible # 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. # 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) if (NOT BUILD_SHARED_LIBS
install(FILES "${SYNCTHINGINTERNAL_LIBRARY_PATH}" DESTINATION "lib${SELECTED_LIB_SUFFIX}" COMPONENT binary) AND NOT META_NO_INSTALL_TARGETS
AND ENABLE_INSTALL_TARGETS)
install(
FILES "${SYNCTHINGINTERNAL_LIBRARY_PATH}"
DESTINATION "lib${SELECTED_LIB_SUFFIX}"
COMPONENT binary)
endif () endif ()

View File

@ -17,13 +17,8 @@ set(HEADER_FILES
syncthingstatusselectionmodel.h syncthingstatusselectionmodel.h
syncthingicons.h syncthingicons.h
colors.h) colors.h)
set(SRC_FILES set(SRC_FILES syncthingmodel.cpp syncthingdirectorymodel.cpp syncthingdevicemodel.cpp syncthingdownloadmodel.cpp
syncthingmodel.cpp syncthingstatusselectionmodel.cpp syncthingicons.cpp)
syncthingdirectorymodel.cpp
syncthingdevicemodel.cpp
syncthingdownloadmodel.cpp
syncthingstatusselectionmodel.cpp
syncthingicons.cpp)
set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc) set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc)
set(TS_FILES translations/${META_PROJECT_NAME}_cs_CZ.ts translations/${META_PROJECT_NAME}_de_DE.ts set(TS_FILES translations/${META_PROJECT_NAME}_cs_CZ.ts translations/${META_PROJECT_NAME}_de_DE.ts
@ -42,11 +37,7 @@ find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
use_syncthingconnector(VISIBILITY PUBLIC) use_syncthingconnector(VISIBILITY PUBLIC)
# link also explicitely against the following Qt 5 modules # link also explicitely against the following Qt 5 modules
list(APPEND ADDITIONAL_QT_MODULES list(APPEND ADDITIONAL_QT_MODULES Network Gui Widgets Svg)
Network
Gui
Widgets
Svg)
# include modules to apply configuration # include modules to apply configuration
include(BasicConfig) include(BasicConfig)

View File

@ -132,6 +132,6 @@ include(ConfigHeader)
add_desktop_file() add_desktop_file()
if (APPLE) if (APPLE)
set_target_properties(${META_TARGET_NAME} set_target_properties(${META_TARGET_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST
PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist.in") "${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist.in")
endif () endif ()

View File

@ -89,16 +89,16 @@ option(USE_LIBSYNCTHING "whether libsyncthing should be included for the launche
if (USE_LIBSYNCTHING) if (USE_LIBSYNCTHING)
find_package(syncthing ${META_APP_VERSION} REQUIRED) find_package(syncthing ${META_APP_VERSION} REQUIRED)
use_syncthing() use_syncthing()
set_source_files_properties(misc/syncthinglauncher.cpp set_source_files_properties(misc/syncthinglauncher.cpp PROPERTIES COMPILE_DEFINITIONS SYNCTHINGWIDGETS_USE_LIBSYNCTHING)
PROPERTIES
COMPILE_DEFINITIONS
SYNCTHINGWIDGETS_USE_LIBSYNCTHING)
endif () endif ()
# configure logging JavaScript events to stderr # configure logging JavaScript events to stderr
option(SYNCTHING_WIDGETS_LOG_JAVASCRIPT_CONSOLE "enables logging JavaScript events of webview to stderr" OFF) option(SYNCTHING_WIDGETS_LOG_JAVASCRIPT_CONSOLE "enables logging JavaScript events of webview to stderr" OFF)
if (SYNCTHING_WIDGETS_LOG_JAVASCRIPT_CONSOLE) if (SYNCTHING_WIDGETS_LOG_JAVASCRIPT_CONSOLE)
set_property(SOURCE webview/webpage.cpp APPEND PROPERTY COMPILE_DEFINITIONS SYNCTHINGWIDGETS_LOG_JAVASCRIPT_CONSOLE) set_property(
SOURCE webview/webpage.cpp
APPEND
PROPERTY COMPILE_DEFINITIONS SYNCTHINGWIDGETS_LOG_JAVASCRIPT_CONSOLE)
message(WARNING "JavaScript console of web view will be logged to stderr") message(WARNING "JavaScript console of web view will be logged to stderr")
endif () endif ()