forked from ericyao2013/platform-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (34 loc) · 1.55 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
42
43
44
45
46
cmake_minimum_required(VERSION 3.12)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC AIRMAPD_VERSION_GIT_REVISION)
git_describe(VERSION --tags --abbrev=0)
message(STATUS "Git -- refspec: ${GIT_REFSPEC} -- sha1: ${AIRMAPD_VERSION_GIT_REVISION}")
message(STATUS "Version: ${VERSION}")
message(STATUS "Building in git revision ${AIRMAPD_VERSION_GIT_REVISION}")
string(TIMESTAMP AIRMAPD_VERSION_BUILD_TIMESTAMP "%Y-%m-%dT%H:%M:%S.000000Z" UTC)
message(STATUS "Building in build timestamp ${AIRMAPD_VERSION_BUILD_TIMESTAMP}")
project(airmap
VERSION "${VERSION}"
LANGUAGES C CXX)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
option(AIRMAP_ENABLE_NETWORK_TESTS "enable tests requiring network access" ON)
option(AIRMAP_ENABLE_GRPC "Enable libraries/executables requiring gRPC" OFF)
option(AIRMAP_ENABLE_QT "Enable libraries/executables requiring Qt5" OFF)
if (AIRMAP_ENABLE_GRPC)
add_definitions(-DAIRMAP_ENABLE_GRPC)
endif ()
# Detecting the platform at build time and exposing
# information on the platform to the platform
set(AIRMAP_PLATFORM "null")
if (UNIX)
# We are treating OS X as a proper Linux-like operating system and store
# configuration files according to the XDG directory standard.
set(AIRMAP_PLATFORM "linux")
endif()
message(STATUS "Enabling platform ${AIRMAP_PLATFORM}")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(external.cmake)
include(airmapd.cmake)
include(pack.cmake)