2016-08-25 00:45:32 +02:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
# metadata
|
|
|
|
set(META_PROJECT_NAME syncthingtray)
|
|
|
|
set(META_PROJECT_TYPE application)
|
|
|
|
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")
|
2016-11-08 19:32:32 +01:00
|
|
|
set(META_APP_CATEGORIES "System;Utility;Network;FileTransfer")
|
2016-08-25 00:45:32 +02:00
|
|
|
set(META_VERSION_MAJOR 0)
|
2017-03-22 21:22:30 +01:00
|
|
|
set(META_VERSION_MINOR 6)
|
2017-07-16 21:08:38 +02:00
|
|
|
set(META_VERSION_PATCH 3)
|
2016-10-22 21:01:32 +02:00
|
|
|
set(META_VERSION_EXACT_SONAME ON)
|
2016-08-25 00:45:32 +02:00
|
|
|
|
2016-09-30 23:55:25 +02:00
|
|
|
project(${META_PROJECT_NAME})
|
|
|
|
|
2017-07-20 00:02:05 +02:00
|
|
|
# disable Dolphin integration under Android, Windows and MacOS by default
|
|
|
|
if(ANDROID OR WIN32 OR APPLE)
|
|
|
|
set(FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT ON)
|
|
|
|
else()
|
|
|
|
set(FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT OFF)
|
|
|
|
endif()
|
|
|
|
|
2016-09-30 23:55:25 +02:00
|
|
|
# options for partial build
|
2017-04-23 18:27:31 +02:00
|
|
|
option(NO_CLI "whether building CLI should be skipped" OFF)
|
|
|
|
option(NO_TRAY "whether building the tray should be skipped" OFF)
|
2017-07-20 00:02:05 +02:00
|
|
|
option(NO_FILE_ITEM_ACTION_PLUGIN "whether building the file item action plugin should be skipped" "${FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT}")
|
2017-04-23 18:27:31 +02:00
|
|
|
option(NO_MODEL "whether building models should be skipped, implies NO_TRAY" OFF)
|
|
|
|
option(NO_WIDGETS "whether building widgets should be skipped, implies NO_TRAY" OFF)
|
2016-09-30 23:55:25 +02:00
|
|
|
|
|
|
|
# add subdirectories
|
2017-03-27 22:05:47 +02:00
|
|
|
enable_testing()
|
2016-09-30 23:55:25 +02:00
|
|
|
add_subdirectory(connector)
|
2017-07-11 22:40:04 +02:00
|
|
|
add_subdirectory(testhelper)
|
|
|
|
|
2016-09-30 23:55:25 +02:00
|
|
|
link_directories(${LIB_SYNCTHING_CONNECTOR_BINARY_DIR})
|
2016-10-02 21:59:28 +02:00
|
|
|
if(NOT NO_CLI)
|
|
|
|
add_subdirectory(cli)
|
|
|
|
endif()
|
2016-09-30 23:55:25 +02:00
|
|
|
if(NOT NO_MODEL)
|
|
|
|
add_subdirectory(model)
|
|
|
|
link_directories(${LIB_SYNCTHING_MODEL_BINARY_DIR})
|
2017-04-23 18:27:31 +02:00
|
|
|
if(NOT NO_WIDGETS)
|
|
|
|
add_subdirectory(widgets)
|
|
|
|
if(NOT NO_TRAY)
|
|
|
|
add_subdirectory(tray)
|
|
|
|
endif()
|
2016-09-30 23:55:25 +02:00
|
|
|
endif()
|
2016-08-25 00:45:32 +02:00
|
|
|
endif()
|
2017-02-20 18:37:11 +01:00
|
|
|
if(NOT NO_FILE_ITEM_ACTION_PLUGIN)
|
|
|
|
add_subdirectory(fileitemactionplugin)
|
|
|
|
endif()
|