This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
97 lines (74 loc) · 3.17 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Project
project(mapping_gfbio
LANGUAGES CXX
)
# CMake Settings
cmake_minimum_required(VERSION 3.5)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
## Debug
set(CMAKE_VERBOSE_MAKEFILE off)
# C++ Standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# CMake Directory of Core
find_file(
MAPPING_CORE_PATH
mapping-core
HINTS ..
DOC "The `mapping-core`path"
)
list(APPEND CMAKE_MODULE_PATH ${MAPPING_CORE_PATH}/cmake)
# Indicator if it is included as a module
get_directory_property(is_mapping_module PARENT_DIRECTORY)
# Libraries
include(LinkLibrariesInternal)
# Dependencies
include(DownloadProject)
find_package(PugiXML REQUIRED)
find_package(Boost COMPONENTS thread system REQUIRED)
if (NOT is_mapping_module)
# Disable options from cpptoml
option(ENABLE_LIBCXX "Use libc++ for the C++ standard library" OFF)
option(CPPTOML_BUILD_EXAMPLES "Build examples" OFF)
download_project(PROJ jsoncpp
GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp.git
GIT_TAG 1.7.7
UPDATE_DISCONNECTED 1
)
add_subdirectory(${jsoncpp_SOURCE_DIR} ${jsoncpp_BINARY_DIR} EXCLUDE_FROM_ALL)
download_project(PROJ cpptoml
GIT_REPOSITORY https://github.com/skystrife/cpptoml.git
GIT_TAG master
UPDATE_DISCONNECTED 1
PREFIX CMakeFiles/Download
)
add_subdirectory(${cpptoml_SOURCE_DIR} ${cpptoml_BINARY_DIR} EXCLUDE_FROM_ALL)
endif (NOT is_mapping_module)
download_project(PROJ cpp-jwt
GIT_REPOSITORY https://github.com/michaelmattig/cpp-jwt.git
GIT_TAG master
UPDATE_DISCONNECTED 1
PREFIX CMakeFiles/Download
)
add_subdirectory(${cpp-jwt_SOURCE_DIR} ${cpp-jwt_BINARY_DIR} EXCLUDE_FROM_ALL)
find_package(OpenSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
download_project(PROJ cppcodec
GIT_REPOSITORY https://github.com/tplgy/cppcodec.git
GIT_TAG v0.2
UPDATE_DISCONNECTED 1
PREFIX CMakeFiles/Download
)
add_subdirectory(${cppcodec_SOURCE_DIR} ${cppcodec_BINARY_DIR} EXCLUDE_FROM_ALL)
add_subdirectory(src)
add_subdirectory(test)
# Add libraries for inlcuding them in the core build process
if (is_mapping_module)
set(MAPPING_ADD_TO_BASE_OBJECTS ${MAPPING_ADD_TO_BASE_OBJECTS} mapping_gfbio_base_lib PARENT_SCOPE)
set(MAPPING_ADD_TO_OPERATORS_OBJECTS ${MAPPING_ADD_TO_OPERATORS_OBJECTS} mapping_gfbio_operators_lib PARENT_SCOPE)
set(MAPPING_ADD_TO_OPERATORS_LIBRARIES ${MAPPING_ADD_TO_OPERATORS_LIBRARIES} ${PUGIXML_LIBRARIES} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} PARENT_SCOPE)
set(MAPPING_ADD_TO_BASE_LIBRARIES ${MAPPING_ADD_TO_BASE_LIBRARIES} PocoFoundation PocoNet PocoNetSSL PARENT_SCOPE)
set(MAPPING_ADD_TO_SERVICES_OBJECTS ${MAPPING_ADD_TO_SERVICES_OBJECTS} mapping_gfbio_services_lib PARENT_SCOPE)
set(MAPPING_ADD_TO_UNITTESTS_LIBRARIES_INTERNAL ${MAPPING_ADD_TO_UNITTESTS_LIBRARIES_INTERNAL} mapping_gfbio_unittests_lib PARENT_SCOPE)
set(SYSTEMTESTS_mapping-gfbio_INTERNAL ${systemtests} PARENT_SCOPE)
endif (is_mapping_module)