This repository was archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
62 lines (50 loc) · 1.95 KB
/
CMakeLists.txt
File metadata and controls
62 lines (50 loc) · 1.95 KB
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
# Project
project(mapping_core
LANGUAGES CXX
)
# CMake Settings
cmake_minimum_required(VERSION 3.7)
cmake_policy(SET CMP0079 NEW)
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
## Debug
set(CMAKE_VERBOSE_MAKEFILE OFF)
# C++ Standard
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/target/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/target/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/target/lib)
# User Options
set(MAPPING_MODULE_PATH .. CACHE PATH "A list of mapping modules to include in the build process")
set(MAPPING_MODULES "" CACHE STRING "A list of mapping modules to include in the build process")
# Disable options from cpptoml
option(ENABLE_LIBCXX "Use libc++ for the C++ standard library" OFF)
option(CPPTOML_BUILD_EXAMPLES "Build examples" OFF)
# External Dependencies
include(DownloadProject)
## Core
download_project(PROJ jsoncpp
GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp.git
GIT_TAG 1.7.7
UPDATE_DISCONNECTED 1
PREFIX CMakeFiles/Download
)
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)
# Modules
set(MAPPING_CORE_PATH ${CMAKE_SOURCE_DIR} CACHE PATH "This is the mapping-core directory." FORCE)
foreach (mapping_module IN ITEMS ${MAPPING_MODULES})
message(STATUS "Loading Module `${mapping_module}`")
add_subdirectory(${MAPPING_MODULE_PATH}/${mapping_module} target/modules/${mapping_module})
endforeach (mapping_module)
add_subdirectory(src)
include(CTest)
enable_testing()
add_subdirectory(test)