-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
85 lines (70 loc) · 1.94 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
cmake_minimum_required(VERSION 3.1)
project(bag_to_cam_pose_data)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
rosbag
roscpp
sensor_msgs
geometry_msgs
message_filters
)
catkin_package(
CATKIN_DEPENDS
sensor_msgs
geometry_msgs
INCLUDE_DIRS
include
)
set(CMAKE_CXX_STANDARD 11)
## Compiler Options
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -w")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -g -O0 -Wall -Wextra -fno-stack-protector")
## the flag for using the gold linker is only for gcc, won't work on clang
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include/
)
include_directories(
SYSTEM
${catkin_INCLUDE_DIRS}
)
add_executable(
bag_to_cam_pose_data
src/bag_to_cam_pose_data.cpp
)
## ADD DEPENDENCIES TO ALL TARGETS
foreach(TARGET
bag_to_cam_pose_data
)
add_dependencies(
${TARGET} ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS}
)
endforeach()
## Specify libraries to link a library or executable target against
## catkin libs
# link all targets against catkin libs
foreach(TARGET
bag_to_cam_pose_data
)
target_link_libraries(${TARGET} ${catkin_LIBRARIES})
endforeach()
install(TARGETS bag_to_cam_pose_data
RUNTIME
DESTINATION /usr/local/bin
)
# uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()