-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
41 lines (37 loc) · 1.43 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.15)
project(asteroidsyncservice VERSION 2.0.0
DESCRIPTION "A synchronization daemon for AsteroidOS watches"
)
# options off-by-default that you can enable
option(SAILFISHOS_PLATFORM "Build the project for the SailfishOS platform" OFF)
option(UBUNTU_TOUCH_PLATFORM "Build the project for the Ubuntu Touch platform" OFF)
option(WITH_DOC "Create project documentation" OFF)
if (SAILFISHOS_PLATFORM)
set(PLATFORM_SOURCE_DIR "platforms/sailfishos")
set(DAEMON_PLATFORM_SOURCE_DIR "platforms/sailfishos")
set(SYSTEMD_SERVICE_NAME "harbour-asteroidsyncserviced.service")
elseif (UBUNTU_TOUCH_PLATFORM)
set(PLATFORM_SOURCE_DIR "platforms/ubuntutouch")
set(DAEMON_PLATFORM_SOURCE_DIR "platforms/ubuntutouch")
set(SYSTEMD_SERVICE_NAME "")
elseif (DESKTOP_PLATFORM)
set(PLATFORM_SOURCE_DIR "platforms/sailfishos")
set(DAEMON_PLATFORM_SOURCE_DIR "platforms/ubuntutouch")
set(SYSTEMD_SERVICE_NAME "asteroidsync.service")
else()
message(FATAL_ERROR "no platform selected: you must enable one of SAILFISHOS_PLATFORM or UBUNTU_TOUCH_PLATFORM or DESKTOP_PLATFORM")
endif()
include(GNUInstallDirs)
configure_file(
"asteroidsyncservice_config.h.in"
"asteroidsyncservice_config.h"
)
add_subdirectory(asteroidsyncservice)
add_subdirectory(asteroidsyncserviced)
if (WITH_DOC)
add_subdirectory(doc)
endif()
# add config file
# OTHER_FILES += \
# README.md \
# rpm/asteroidsyncservice.spec