2016-09-30 23:55:25 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# metadata
|
|
|
|
set(META_PROJECT_NAME syncthingmodel)
|
|
|
|
set(META_PROJECT_TYPE library)
|
2016-10-02 21:59:28 +02:00
|
|
|
set(META_APP_NAME "Data models of Syncthing Tray")
|
2016-09-30 23:55:25 +02:00
|
|
|
set(META_APP_DESCRIPTION "Data models of Syncthing Tray")
|
|
|
|
set(META_PROJECT_VARNAME_UPPER LIB_SYNCTHING_MODEL)
|
2017-04-23 14:00:43 +02:00
|
|
|
set(META_PUBLIC_QT_MODULES Gui Widgets)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# add project files
|
|
|
|
set(HEADER_FILES
|
2016-11-02 21:05:32 +01:00
|
|
|
syncthingmodel.h
|
2016-09-30 23:55:25 +02:00
|
|
|
syncthingdirectorymodel.h
|
|
|
|
syncthingdevicemodel.h
|
|
|
|
syncthingdownloadmodel.h
|
2018-10-10 17:48:48 +02:00
|
|
|
syncthingstatusselectionmodel.h
|
2017-02-20 18:03:20 +01:00
|
|
|
syncthingicons.h
|
2019-02-06 17:36:14 +01:00
|
|
|
colors.h)
|
2016-09-30 23:55:25 +02:00
|
|
|
set(SRC_FILES
|
2016-11-02 21:05:32 +01:00
|
|
|
syncthingmodel.cpp
|
2016-09-30 23:55:25 +02:00
|
|
|
syncthingdirectorymodel.cpp
|
|
|
|
syncthingdevicemodel.cpp
|
|
|
|
syncthingdownloadmodel.cpp
|
2018-10-10 17:48:48 +02:00
|
|
|
syncthingstatusselectionmodel.cpp
|
2019-02-06 17:36:14 +01:00
|
|
|
syncthingicons.cpp)
|
|
|
|
set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
2019-02-06 17:36:14 +01:00
|
|
|
set(TS_FILES translations/${META_PROJECT_NAME}_de_DE.ts translations/${META_PROJECT_NAME}_en_US.ts)
|
2016-10-05 23:01:53 +02:00
|
|
|
|
2016-09-30 23:55:25 +02:00
|
|
|
# find c++utilities
|
2019-03-13 19:12:23 +01:00
|
|
|
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
2016-09-30 23:55:25 +02:00
|
|
|
use_cpp_utilities()
|
|
|
|
|
2016-10-03 00:41:38 +02:00
|
|
|
# find qtutilities (only CMake modules used)
|
2019-03-13 19:12:23 +01:00
|
|
|
find_package(qtutilities${CONFIGURATION_PACKAGE_SUFFIX} 6.0.0 REQUIRED)
|
2018-10-10 17:48:48 +02:00
|
|
|
use_qt_utilities()
|
2016-10-03 00:41:38 +02:00
|
|
|
|
2016-09-30 23:55:25 +02:00
|
|
|
# find backend libraries
|
|
|
|
find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
|
2019-03-13 19:12:23 +01:00
|
|
|
use_syncthingconnector(VISIBILITY PUBLIC)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# link also explicitely against the following Qt 5 modules
|
2019-02-06 17:36:14 +01:00
|
|
|
list(APPEND ADDITIONAL_QT_MODULES
|
|
|
|
Network
|
|
|
|
Gui
|
|
|
|
Widgets
|
|
|
|
Svg)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(QtConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(LibraryTarget)
|
|
|
|
include(Doxygen)
|
|
|
|
include(ConfigHeader)
|