-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (46 loc) · 1.25 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
cmake_minimum_required(VERSION 3.10)
project(test_package)
## Use C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
## By adding -Wall and -Werror, the compiler does not ignore warnings anymore,
## enforcing cleaner code.
add_definitions(-Wall -Werror)
## Find catkin macros and libraries
find_package(catkin REQUIRED
COMPONENTS
roscpp
std_msgs
tf2_ros
)
###################################
## catkin specific configuration ##
###################################
catkin_package(
CATKIN_DEPENDS
roscpp
std_msgs
tf2_ros
)
###########
## Build ##
###########
include_directories(
${catkin_INCLUDE_DIRS}
)
## Declare Executables (nodes)
add_executable(hello_world
src/hello_world_node.cpp)
target_link_libraries(hello_world ${catkin_LIBRARIES})
add_executable(talker
src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_executable(listener
src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_executable(callback_threads
src/callback_threads.cpp)
target_link_libraries(callback_threads ${catkin_LIBRARIES})
add_executable(transforms
src/transforms.cpp)
target_link_libraries(transforms ${catkin_LIBRARIES})