-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
85 lines (63 loc) · 1.9 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
cmake_minimum_required(VERSION 3.13)
project(uavAP)
#######Build configuration########
option(NO_DL "Deactivate dynamic linking in the Plugin Manager." OFF)
option(GS "Build the Ground Station." OFF)
option(XPLANE "Build the XPlane Plugin." OFF)
option(CORE "Always build cps_core." OFF)
option(PYTHON "Build the Python API." OFF)
set(SUBMODULE_DIR ${CMAKE_SOURCE_DIR}/extern)
if (NO_DL)
add_definitions(-DNO_DL)
endif (NO_DL)
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
include_directories(${Boost_INCLUDE_DIRS})
set(CPS_CORE_LIB cps_core cps_framework_api)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z -fPIC -Wall -Wno-int-in-bool-context -Wno-parentheses")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall")
include_directories(${CMAKE_SOURCE_DIR}/include)
link_directories(${Boost_LIBRARY_DIRS}
)
if (LINK_STATIC)
set(ARB libarb.a
libmpfr.a
libgmp.a
libflint.a)
else (LINK_STATIC)
set(ARB arb
mpfr
gmp
flint)
endif (LINK_STATIC)
set(REDIS cpp_redis
tacopie
)
if (NODEBUG)
add_definitions(-DNODEBUG)
endif (NODEBUG)
if (NOT APPLE)
set(SYSTEM_LIBS ${SYSTEM_LIBS} rt)
set(SYSTEM_LIBS_STATIC ${SYSTEM_LIBS_STATIC} rt.a)
endif(NOT APPLE)
if (PYTHON)
add_subdirectory(${SUBMODULE_DIR}/pybind11)
endif (PYTHON)
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
include_directories(${SUBMODULE_DIR}/cpsCore/include)
set(CPS_CORE_DONT_BUILD_TESTS ON)
set(TEST_SRCS )
add_subdirectory(${SUBMODULE_DIR}/cpsCore)
add_subdirectory(src)
add_subdirectory(tests)
# Print the test sources
if (GS)
add_subdirectory(${SUBMODULE_DIR}/uavGS)
endif (GS)
if (XPLANE)
add_subdirectory(${SUBMODULE_DIR}/uavEE)
include_directories(${SUBMODULE_DIR}/uavEE/include)
endif (XPLANE)
install(DIRECTORY include/uavAP DESTINATION include)
install(DIRECTORY config DESTINATION .)