See the commit message of the corresponding commit in c++utilities (9fb3bbe179698fb10339d4911b98531b0847cfa1) and also the related commit in reflective-rapidjson (5c49a438ade5ae4253ae978e3a22cf88bd7cb2e2).
46 lines
1.3 KiB
CMake
46 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
# metadata
|
|
set(META_PROJECT_NAME syncthingctl)
|
|
set(META_APP_NAME "Syncthing control")
|
|
set(META_APP_DESCRIPTION "Command line app to control Syncthing")
|
|
set(META_PROJECT_TYPE application)
|
|
set(META_JS_SRC_DIR .)
|
|
|
|
# add project files
|
|
set(HEADER_FILES helper.h args.h application.h)
|
|
set(SRC_FILES main.cpp args.cpp application.cpp)
|
|
set(TEST_HEADER_FILES)
|
|
set(TEST_SRC_FILES tests/application.cpp)
|
|
|
|
# find c++utilities
|
|
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.10.0 REQUIRED)
|
|
use_cpp_utilities()
|
|
|
|
# find qtutilities
|
|
find_package(qtutilities${CONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES} 6.0.0 REQUIRED)
|
|
use_qt_utilities(ONLY_HEADERS VISIBILITY PUBLIC)
|
|
|
|
# find backend libraries
|
|
find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
|
|
use_syncthingconnector()
|
|
|
|
find_package(syncthingtesthelper ${META_APP_VERSION} REQUIRED)
|
|
list(APPEND TEST_LIBRARIES ${SYNCTHINGTESTHELPER_LIB})
|
|
|
|
# include modules to apply configuration
|
|
include(BasicConfig)
|
|
include(QtJsProviderConfig)
|
|
if (JS_PROVIDER)
|
|
list(APPEND HEADER_FILES jsconsole.h)
|
|
list(APPEND SRC_FILES jsconsole.cpp)
|
|
list(APPEND RES_FILES resources/js/js.qrc)
|
|
endif ()
|
|
include(QtConfig)
|
|
include(WindowsResources)
|
|
include(AppTarget)
|
|
include(TestTarget)
|
|
include(ShellCompletion)
|
|
include(Doxygen)
|
|
include(ConfigHeader)
|