-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
39 lines (28 loc) · 1.18 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
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0
cmake_minimum_required(VERSION 3.16)
# Build targets
project(dbs-map-api VERSION 1.0.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-deprecated-declarations")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(RAPIDJSON_HAS_CXX11_RANGE_FOR ON)
option(ENABLE_TESTS "Enable Testing of dbs-map-api" ON)
# Add cmake dir to search list
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
option(YOCTO_BUILD "Is Yocto Build Environment" OFF)
IF( NOT ${YOCTO_BUILD})
# only import when not using YOCTO
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND ENABLE_TESTS)
add_subdirectory(externals/googletest)
endif()
# Explicitly allow overriding cache variables with local variables. This is standard behaviour in cmake 3.13 and above, but olp-sdk still uses 3.9
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(OLP_SDK_ENABLE_TESTING OFF)
add_subdirectory(externals/here-olp-sdk)
add_subdirectory(externals/curlpp)
# add_subdirectory(externals/rapidjson)
ENDIF()
add_subdirectory(dbs-map-api)
# TODO: add condition for building docs
add_subdirectory(docs)