2016-09-30 23:55:25 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# metadata
|
|
|
|
set(META_PROJECT_NAME syncthingconnector)
|
|
|
|
set(META_PROJECT_TYPE library)
|
2016-10-02 21:59:28 +02:00
|
|
|
set(META_APP_NAME "Connection backend of Syncthing Tray")
|
2016-09-30 23:55:25 +02:00
|
|
|
set(META_APP_DESCRIPTION "Connection backend of Syncthing Tray")
|
|
|
|
set(META_PROJECT_VARNAME_UPPER LIB_SYNCTHING_CONNECTOR)
|
|
|
|
|
|
|
|
# add project files
|
|
|
|
set(HEADER_FILES
|
|
|
|
syncthingconnection.h
|
|
|
|
syncthingconnectionsettings.h
|
|
|
|
syncthingconfig.h
|
|
|
|
syncthingprocess.h
|
|
|
|
utils.h
|
|
|
|
)
|
|
|
|
set(SRC_FILES
|
|
|
|
syncthingconnection.cpp
|
|
|
|
syncthingconnectionsettings.cpp
|
|
|
|
syncthingconfig.cpp
|
|
|
|
syncthingprocess.cpp
|
|
|
|
utils.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
# find c++utilities
|
|
|
|
find_package(c++utilities 4.0.0 REQUIRED)
|
|
|
|
use_cpp_utilities()
|
|
|
|
|
2016-10-03 00:41:38 +02:00
|
|
|
# find qtutilities (only headers and CMake modules used)
|
2016-09-30 23:55:25 +02:00
|
|
|
find_package(qtutilities 5.0.0 REQUIRED)
|
|
|
|
include_directories(BEFORE SYSTEM ${QT_UTILITIES_INCLUDE_DIRS})
|
2016-10-03 00:41:38 +02:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# link also explicitely against the following Qt 5 modules
|
|
|
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(QtConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(LibraryTarget)
|
|
|
|
include(Doxygen)
|
|
|
|
include(ConfigHeader)
|