-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
72 lines (62 loc) · 1.54 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
cmake_minimum_required(VERSION 2.8.3)
project(fcl_examples)
####################
## compile option ##
####################
add_compile_options(-std=c++17)
#####################
## catkin settings ##
#####################
find_package(catkin REQUIRED COMPONENTS
roscpp
)
catkin_package(
CATKIN_DEPENDS roscpp
)
include_directories(${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})
###########
## Eigen ##
###########
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
link_directories(${EIGEN3_LIBRARY_DIRS})
#########
## FCL ##
#########
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
find_package(FCL REQUIRED)
include_directories(${FCL_INCLUDE_DIRS})
link_directories(${FCL_LIBRARY_DIRS})
##################
## Original Lib ##
##################
add_library(FCLExampleUtils SHARED
src/broadphase/utils.cpp
src/broadphase/utils.h
)
set(ORIGINAL_LIBS
FCLExampleUtils
)
###########
## Build ##
###########
set(NARROW_PHASE_SOURCE
np_sphere_sphere
np_box_sphere
np_box_box
np_cylinder_sphere
np_cylinder_box
np_cylinder_cylinder
)
set(BROAD_PHASE_SOURCE
bp_dynamic_aabb_tree
)
foreach(src ${NARROW_PHASE_SOURCE})
add_executable(${src} src/narrowphase/${src}.cpp)
target_link_libraries(${src} ${FCL_LIBRARIES} ${EIGEN3_LIBRARIES} ${catkin_LIBRARIES})
endforeach(src)
foreach(src ${BROAD_PHASE_SOURCE})
add_executable(${src} src/broadphase/${src}.cpp)
target_link_libraries(${src} ${ORIGINAL_LIBS} ${FCL_LIBRARIES} ${EIGEN3_LIBRARIES} ${catkin_LIBRARIES})
endforeach(src)