-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
102 lines (80 loc) · 3.4 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
98
99
100
101
102
cmake_minimum_required(VERSION 3.0.2)
project(emc_system)
add_compile_options(-Wall -Werror=all)
add_compile_options(-Wextra -Werror=extra)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
sensor_msgs
nav_msgs
roscpp
tf2
tf2_ros
)
# find_package(Boost REQUIRED COMPONENTS system program_options)
# find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
# ------------------------------------------------------------------------------------------------
# CATKIN EXPORT
# ------------------------------------------------------------------------------------------------
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES bla
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
)
# ------------------------------------------------------------------------------------------------
# BUILD
# ------------------------------------------------------------------------------------------------
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_library(emc_system
include/emc/engine.h
include/emc/communication.h
include/emc/data.h
include/emc/odom.h
include/emc/io.h
include/emc/rate.h
include/emc/bumper.h
src/engine.cpp
src/communication.cpp
src/data.cpp
src/io.cpp
src/rate.cpp
)
target_link_libraries(emc_system ${catkin_LIBRARIES})
# ------------------------------------------------------------------------------------------------
# TOOLS
# ------------------------------------------------------------------------------------------------
add_executable(emc_viz tools/visualize.cpp)
target_link_libraries(emc_viz emc_system ${OpenCV_LIBRARIES})
# ------------------------------------------------------------------------------------------------
# IO
# ------------------------------------------------------------------------------------------------
add_executable(emc_test_io examples/test_io.cpp)
target_link_libraries(emc_test_io emc_system)
add_executable(testspeech examples/testspeech.cpp)
target_link_libraries(testspeech emc_system)
add_executable(test_send_path examples/test_sendpath.cpp)
target_link_libraries(test_send_path emc_system)
add_executable(test_send_pose examples/test_sendpose.cpp)
target_link_libraries(test_send_pose emc_system)
# ------------------------------------------------------------------------------------------------
# EXAMPLES
# ------------------------------------------------------------------------------------------------
add_executable(emc_example1 examples/example01.cpp)
target_link_libraries(emc_example1 emc_system)
add_executable(emc_example2 examples/example02.cpp)
target_link_libraries(emc_example2 emc_system)
add_executable(emc_example3 examples/example03.cpp)
target_link_libraries(emc_example3 emc_system)
# ------------------------------------------------------------------------------------------------
# UNIT TESTS
# ------------------------------------------------------------------------------------------------
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest_gtest(tests_io test/io.test test/test_io.cpp)
target_link_libraries(tests_io emc_system ${catkin_LIBRARIES})
endif()