2023-07-23 21:05:22 +02:00
|
|
|
cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# 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
|
2020-01-18 16:37:20 +01:00
|
|
|
syncthingrecentchangesmodel.h
|
2020-10-20 19:16:53 +02:00
|
|
|
syncthingsortfiltermodel.h
|
2021-01-01 20:48:19 +01:00
|
|
|
syncthingstatuscomputionmodel.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)
|
2020-01-18 16:37:20 +01:00
|
|
|
set(SRC_FILES
|
|
|
|
syncthingmodel.cpp
|
|
|
|
syncthingdirectorymodel.cpp
|
|
|
|
syncthingdevicemodel.cpp
|
|
|
|
syncthingdownloadmodel.cpp
|
|
|
|
syncthingrecentchangesmodel.cpp
|
2020-10-20 19:16:53 +02:00
|
|
|
syncthingsortfiltermodel.cpp
|
2021-01-01 20:48:19 +01:00
|
|
|
syncthingstatuscomputionmodel.cpp
|
2020-01-18 16:37:20 +01:00
|
|
|
syncthingstatusselectionmodel.cpp
|
|
|
|
syncthingicons.cpp)
|
2019-02-06 17:36:14 +01:00
|
|
|
set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
2021-10-07 18:28:13 +02:00
|
|
|
set(TS_FILES translations/${META_PROJECT_NAME}_zh_CN.ts translations/${META_PROJECT_NAME}_cs_CZ.ts
|
|
|
|
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
|
2021-10-02 11:58:02 +02:00
|
|
|
find_package(${PACKAGE_NAMESPACE_PREFIX}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)
|
2021-10-02 11:58:02 +02:00
|
|
|
find_package(${PACKAGE_NAMESPACE_PREFIX}qtutilities${CONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES} 6.3.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
|
|
|
|
2021-09-11 02:20:38 +02:00
|
|
|
# find qtforkawesome
|
2022-10-03 14:40:14 +02:00
|
|
|
find_package(${PACKAGE_NAMESPACE_PREFIX}qtforkawesome${CONFIGURATION_PACKAGE_SUFFIX_QTFORKAWESOME} 0.1.0 REQUIRED)
|
2021-09-11 02:20:38 +02:00
|
|
|
use_qt_fork_awesome(VISIBILITY PUBLIC)
|
|
|
|
|
2021-07-03 19:29:49 +02:00
|
|
|
# link also explicitly against the following Qt modules
|
2019-11-30 18:24:19 +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)
|