60 lines
2.0 KiB
CMake
60 lines
2.0 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_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 "System;Utility;Network;FileTransfer")
|
|
set(META_GUI_OPTIONAL false)
|
|
set(META_VERSION_MAJOR 0)
|
|
set(META_VERSION_MINOR 7)
|
|
set(META_VERSION_PATCH 0)
|
|
set(META_VERSION_EXACT_SONAME ON)
|
|
|
|
project(${META_PROJECT_NAME})
|
|
|
|
# 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)
|
|
set(PLASMOID_DISABLED_BY_DEFAULT ON)
|
|
else()
|
|
set(FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT OFF)
|
|
set(PLASMOID_DISABLED_BY_DEFAULT OFF)
|
|
endif()
|
|
|
|
# options for partial build
|
|
option(NO_CLI "whether building CLI should be skipped" OFF)
|
|
option(NO_TRAY "whether building the tray should be skipped" OFF)
|
|
option(NO_FILE_ITEM_ACTION_PLUGIN "whether building the file item action plugin should be skipped" "${FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT}")
|
|
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)
|
|
option(NO_PLASMOID "whether building the Plasma 5 plasmoid should be skipped" "${PLASMOID_DISABLED_BY_DEFAULT}")
|
|
|
|
# add subdirectories
|
|
enable_testing()
|
|
add_subdirectory(connector)
|
|
add_subdirectory(testhelper)
|
|
|
|
link_directories(${LIB_SYNCTHING_CONNECTOR_BINARY_DIR})
|
|
if(NOT NO_CLI)
|
|
add_subdirectory(cli)
|
|
endif()
|
|
if(NOT NO_MODEL)
|
|
add_subdirectory(model)
|
|
link_directories(${LIB_SYNCTHING_MODEL_BINARY_DIR})
|
|
if(NOT NO_WIDGETS)
|
|
add_subdirectory(widgets)
|
|
if(NOT NO_TRAY)
|
|
add_subdirectory(tray)
|
|
endif()
|
|
if(NOT NO_PLASMOID)
|
|
add_subdirectory(plasmoid)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
if(NOT NO_FILE_ITEM_ACTION_PLUGIN)
|
|
add_subdirectory(fileitemactionplugin)
|
|
endif()
|