-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathCMakeLists.txt
77 lines (63 loc) · 1.96 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
cmake_minimum_required(VERSION 2.8.3)
project(map_conversion)
SET(CMAKE_BUILD_TYPE "Release")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
add_compile_options(-std=c++11)
add_definitions(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
pcl_ros
geometry_msgs
tf
eigen_conversions
)
set(ALL_TARGET_LIBRARIES "")
# find_package(gflags REQUIRED)
include(cmake/glog.cmake)
include(cmake/PCL.cmake)
include(cmake/eigen.cmake)
include(cmake/yaml.cmake)
include_directories( include
${catkin_INCLUDE_DIRS}
)
include(cmake/global_defination.cmake)
catkin_package()
file(GLOB_RECURSE ALL_SRCS "*.cpp")
file(GLOB_RECURSE NODE_SRCS "src/*_node.cpp")
list(REMOVE_ITEM ALL_SRCS ${NODE_SRCS})
add_executable(local_environment_node src/app/local_environment_node.cpp ${ALL_SRCS})
add_dependencies(local_environment_node ${catkin_EXPORTED_TARGETS})
target_link_libraries(local_environment_node ${catkin_LIBRARIES} ${ALL_TARGET_LIBRARIES} gflags yaml-cpp)
add_executable(global_submap_node src/app/global_submap_node.cpp ${ALL_SRCS})
add_dependencies(global_submap_node ${catkin_EXPORTED_TARGETS})
target_link_libraries(global_submap_node ${catkin_LIBRARIES} ${ALL_TARGET_LIBRARIES} gflags yaml-cpp)
install(TARGETS
local_environment_node
global_submap_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY
include/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
## Mark other directories for installation:
install(DIRECTORY
launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)
install(DIRECTORY
config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
FILES_MATCHING PATTERN "*.yaml"
)
install(DIRECTORY
rviz/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/rviz
FILES_MATCHING PATTERN "*.rviz"
)