forked from HKUST-Aerial-Robotics/A-LOAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
94 lines (73 loc) · 2.79 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
cmake_minimum_required(VERSION 2.8.3)
project(aloam_velodyne)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
set(Pangolin_DIR "${PROJECT_SOURCE_DIR}/3rdParty/lib/cmake/Pangolin")
set(Ceres_DIR "${PROJECT_SOURCE_DIR}/3rdParty/lib/cmake/Ceres")
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
sensor_msgs
roscpp
rospy
rosbag
std_msgs
image_transport
cv_bridge
tf
)
#find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Ceres REQUIRED)
include_directories(
include
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
catkin_package(
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs
DEPENDS EIGEN3 PCL
INCLUDE_DIRS include
)
add_executable(ascanRegistration src/scanRegistration.cpp)
target_link_libraries(ascanRegistration ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_executable(ascanRegistration_bpearl src/scanRegistration_bpearl.cpp)
target_link_libraries(ascanRegistration_bpearl ${catkin_LIBRARIES} ${PCL_LIBRARIES})
add_executable(alaserOdometry src/laserOdometry.cpp)
target_link_libraries(alaserOdometry ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${CERES_LIBRARIES})
add_executable(alaserMapping src/laserMapping.cpp)
target_link_libraries(alaserMapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${CERES_LIBRARIES})
add_executable(kittiHelper src/kittiHelper.cpp)
target_link_libraries(kittiHelper ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS})
find_package(Pangolin REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})
add_executable(visualizer
src/Visualization_node.cpp
src/RosVisualization.cpp)
target_link_libraries(visualizer ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${Pangolin_LIBRARIES} ${OpenCV_LIBS})
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
## 添加可执行文件或者库文件,Mark executables and/or libraries for installation
install(TARGETS ascanRegistration alaserOdometry alaserMapping visualizer
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES
${PROJECT_SOURCE_DIR}/3rdParty/lib/libceres.so
${PROJECT_SOURCE_DIR}/3rdParty/lib/libceres.so.1
${PROJECT_SOURCE_DIR}/3rdParty/lib/libceres.so.1.14.0
${PROJECT_SOURCE_DIR}/3rdParty/lib/libpangolin.so
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
## 添加资源文件.Mark other files for installation (e.g. launch and bag files, etc.)
install(FILES
launch/aloam_zhkj_robosense_bpearl5.launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)