140 lines
3.1 KiB
CMake
140 lines
3.1 KiB
CMake
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
# metadata
|
|
set(META_PROJECT_NAME syncthingtray)
|
|
set(META_PROJECT_TYPE application)
|
|
set(META_APP_NAME "Syncthing Tray")
|
|
set(META_APP_AUTHOR "Martchus")
|
|
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
|
set(META_APP_DESCRIPTION "Tray application for Syncthing")
|
|
set(META_APP_CATEGORIES "Utility;Network;")
|
|
set(META_GUI_OPTIONAL false)
|
|
set(META_VERSION_MAJOR 0)
|
|
set(META_VERSION_MINOR 0)
|
|
set(META_VERSION_PATCH 1)
|
|
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
|
|
|
|
# add project files
|
|
set(HEADER_FILES
|
|
data/syncthingconnection.h
|
|
data/syncthingdirectorymodel.h
|
|
data/syncthingdevicemodel.h
|
|
data/syncthingconfig.h
|
|
data/utils.h
|
|
)
|
|
set(SRC_FILES
|
|
data/syncthingconnection.cpp
|
|
data/syncthingdirectorymodel.cpp
|
|
data/syncthingdevicemodel.cpp
|
|
data/syncthingconfig.cpp
|
|
data/utils.cpp
|
|
)
|
|
|
|
set(WIDGETS_HEADER_FILES
|
|
application/settings.h
|
|
gui/trayicon.h
|
|
gui/traywidget.h
|
|
gui/traymenu.h
|
|
gui/settingsdialog.h
|
|
gui/webpage.h
|
|
gui/webviewdialog.h
|
|
gui/webviewprovider.h
|
|
gui/dirbuttonsitemdelegate.h
|
|
gui/devbuttonsitemdelegate.h
|
|
gui/dirview.h
|
|
gui/devview.h
|
|
)
|
|
set(WIDGETS_SRC_FILES
|
|
application/main.cpp
|
|
application/settings.cpp
|
|
gui/trayicon.cpp
|
|
gui/traywidget.cpp
|
|
gui/traymenu.cpp
|
|
gui/settingsdialog.cpp
|
|
gui/webpage.cpp
|
|
gui/webviewdialog.cpp
|
|
gui/dirbuttonsitemdelegate.cpp
|
|
gui/devbuttonsitemdelegate.cpp
|
|
gui/dirview.cpp
|
|
gui/devview.cpp
|
|
resources/icons.qrc
|
|
)
|
|
set(WIDGETS_UI_FILES
|
|
gui/traywidget.ui
|
|
gui/connectionoptionpage.ui
|
|
gui/notificationsoptionpage.ui
|
|
gui/appearanceoptionpage.ui
|
|
gui/autostartoptionpage.ui
|
|
gui/webviewoptionpage.ui
|
|
)
|
|
|
|
#set(QUICK_HEADER_FILES
|
|
#)
|
|
#set(QUICK_SRC_FILES
|
|
#)
|
|
|
|
set(TS_FILES
|
|
translations/${META_PROJECT_NAME}_de_DE.ts
|
|
translations/${META_PROJECT_NAME}_en_US.ts
|
|
)
|
|
|
|
set(ICON_FILES
|
|
resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
|
)
|
|
|
|
set(DOC_FILES
|
|
README.md
|
|
)
|
|
|
|
set(REQUIRED_ICONS
|
|
network-card
|
|
window-close
|
|
edit-copy
|
|
edit-paste
|
|
preferences-other
|
|
view-barcode
|
|
folder-open
|
|
media-playback-start
|
|
text-plain
|
|
help-about
|
|
media-playback-pause
|
|
view-refresh
|
|
folder
|
|
network-server
|
|
folder-sync
|
|
internet-web-browser
|
|
network-connect
|
|
system-run
|
|
system-search
|
|
preferences-desktop
|
|
preferences-desktop-notification
|
|
preferences-desktop-icons
|
|
preferences-desktop-locale
|
|
)
|
|
|
|
# find c++utilities
|
|
find_package(c++utilities 4.0.0 REQUIRED)
|
|
use_cpp_utilities()
|
|
include(BasicConfig)
|
|
|
|
# find qtutilities
|
|
if(WIDGETS_GUI OR QUICK_GUI)
|
|
find_package(qtutilities 5.0.0 REQUIRED)
|
|
use_qt_utilities()
|
|
endif()
|
|
|
|
list(APPEND ADDITIONAL_QT_MODULES Network Svg)
|
|
|
|
# include modules to apply configuration
|
|
include(BasicConfig)
|
|
include(QtGuiConfig)
|
|
include(QtConfig)
|
|
include(WindowsResources)
|
|
include(WebViewProviderConfig)
|
|
include(AppTarget)
|
|
include(ShellCompletion)
|
|
include(ConfigHeader)
|
|
|
|
# create desktop file using previously defined meta data
|
|
add_desktop_file()
|