2016-09-30 23:55:25 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# metadata
|
|
|
|
set(META_PROJECT_TYPE application)
|
2016-10-02 21:59:28 +02:00
|
|
|
set(META_APP_NAME "Syncthing Tray")
|
2016-10-18 22:07:07 +02:00
|
|
|
set(META_APP_ACTIONS OPEN_WEBUI)
|
|
|
|
set(META_APP_ACTION_OPEN_WEBUI "open-webui" "Open web UI" "--webui")
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# add project files
|
|
|
|
set(WIDGETS_HEADER_FILES
|
|
|
|
application/singleinstance.h
|
|
|
|
gui/trayicon.h
|
|
|
|
gui/traywidget.h
|
|
|
|
gui/traymenu.h
|
|
|
|
gui/dirbuttonsitemdelegate.h
|
|
|
|
gui/devbuttonsitemdelegate.h
|
|
|
|
gui/downloaditemdelegate.h
|
|
|
|
gui/dirview.h
|
|
|
|
gui/devview.h
|
|
|
|
gui/downloadview.h
|
|
|
|
)
|
|
|
|
set(WIDGETS_SRC_FILES
|
|
|
|
application/main.cpp
|
|
|
|
application/singleinstance.cpp
|
|
|
|
gui/trayicon.cpp
|
|
|
|
gui/traywidget.cpp
|
|
|
|
gui/traymenu.cpp
|
|
|
|
gui/dirbuttonsitemdelegate.cpp
|
|
|
|
gui/devbuttonsitemdelegate.cpp
|
|
|
|
gui/downloaditemdelegate.cpp
|
|
|
|
gui/dirview.cpp
|
|
|
|
gui/devview.cpp
|
|
|
|
gui/downloadview.cpp
|
2017-02-19 18:00:32 +01:00
|
|
|
)
|
|
|
|
set(RES_FILES
|
|
|
|
resources/${META_PROJECT_NAME}icons.qrc
|
2016-09-30 23:55:25 +02:00
|
|
|
)
|
|
|
|
set(WIDGETS_UI_FILES
|
|
|
|
gui/traywidget.ui
|
|
|
|
)
|
|
|
|
|
|
|
|
set(TS_FILES
|
|
|
|
translations/${META_PROJECT_NAME}_de_DE.ts
|
|
|
|
translations/${META_PROJECT_NAME}_en_US.ts
|
|
|
|
)
|
|
|
|
|
|
|
|
set(ICON_FILES
|
|
|
|
resources/icons/hicolor/scalable/app/${META_PROJECT_NAME}.svg
|
|
|
|
)
|
|
|
|
set(PNG_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/hicolor/scalable/app/${META_PROJECT_NAME}.png")
|
|
|
|
set(PNG_ICON_NO_CROP ON)
|
|
|
|
|
|
|
|
set(DOC_FILES
|
|
|
|
README.md
|
|
|
|
)
|
|
|
|
|
|
|
|
set(REQUIRED_ICONS
|
|
|
|
dialog-cancel
|
|
|
|
dialog-ok
|
|
|
|
dialog-ok-apply
|
|
|
|
edit-copy
|
|
|
|
edit-paste
|
2017-09-05 00:24:52 +02:00
|
|
|
emblem-error
|
2016-09-30 23:55:25 +02:00
|
|
|
folder
|
|
|
|
folder-download
|
|
|
|
folder-open
|
|
|
|
folder-sync
|
2017-10-07 22:24:19 +02:00
|
|
|
go-down
|
|
|
|
go-up
|
2016-09-30 23:55:25 +02:00
|
|
|
help-about
|
|
|
|
internet-web-browser
|
|
|
|
list-add
|
|
|
|
list-remove
|
|
|
|
media-playback-pause
|
|
|
|
media-playback-start
|
|
|
|
network-card
|
|
|
|
network-connect
|
2016-12-11 17:58:58 +01:00
|
|
|
network-disconnect
|
2016-09-30 23:55:25 +02:00
|
|
|
network-server
|
|
|
|
preferences-desktop
|
|
|
|
preferences-desktop-icons
|
|
|
|
preferences-desktop-locale
|
|
|
|
preferences-desktop-notification
|
|
|
|
preferences-other
|
|
|
|
qtcreator
|
|
|
|
system-run
|
|
|
|
system-search
|
|
|
|
system-file-manager
|
|
|
|
text-plain
|
|
|
|
view-barcode
|
|
|
|
view-refresh
|
|
|
|
window-close
|
|
|
|
)
|
2016-11-02 20:09:22 +01:00
|
|
|
# fallback icons can not replace built-in Breeze icons (yet)
|
|
|
|
#set(FALLBACK_ICON_THEME breeze)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# find c++utilities
|
2017-10-17 19:45:27 +02:00
|
|
|
find_package(c++utilities 4.11.0 REQUIRED)
|
2016-09-30 23:55:25 +02:00
|
|
|
use_cpp_utilities()
|
|
|
|
|
|
|
|
# find qtutilities
|
2017-03-14 23:02:04 +01:00
|
|
|
find_package(qtutilities 5.6.0 REQUIRED)
|
2016-09-30 23:55:25 +02:00
|
|
|
use_qt_utilities()
|
|
|
|
|
|
|
|
# find backend libraries
|
|
|
|
find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
|
|
|
|
use_syncthingconnector()
|
|
|
|
find_package(syncthingmodel ${META_APP_VERSION} REQUIRED)
|
|
|
|
use_syncthingmodel()
|
2017-04-23 18:27:31 +02:00
|
|
|
find_package(syncthingwidgets ${META_APP_VERSION} REQUIRED)
|
|
|
|
use_syncthingwidgets()
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# link also explicitely against the following Qt 5 modules
|
2017-02-20 18:03:20 +01:00
|
|
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# include modules to apply configuration
|
|
|
|
include(BasicConfig)
|
|
|
|
include(QtGuiConfig)
|
|
|
|
include(QtConfig)
|
|
|
|
include(WindowsResources)
|
|
|
|
include(AppTarget)
|
|
|
|
include(ShellCompletion)
|
|
|
|
include(Doxygen)
|
|
|
|
include(ConfigHeader)
|
|
|
|
|
|
|
|
# create desktop file using previously defined meta data
|
|
|
|
add_desktop_file()
|