forked from laboshinl/loam_velodyne
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
70 lines (57 loc) · 2.48 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
cmake_minimum_required(VERSION 2.8.3)
project(loam_velodyne)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
sensor_msgs
roscpp
rospy
std_msgs
tf
ecl_time
)
#find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
include_directories(
include
${catkin_INCLUDE_DIRS}
# ${EIGEN3_INCLUDE_DIR}
${PCL_INCLUDE_DIRS})
find_package(but_velodyne REQUIRED)
include_directories(${PCL_INCLUDE_DIRS} ${ButVELODYNE_INCLUDE_DIRS})
link_directories( ${PCL_LIBRARY_DIRS} ${ButVELODYNE_LIBRARY_DIRS})
set(VELODYNE_MODEL "64" CACHE FILEPATH "Model of the Velodyne LiDAR (16, 32 or 64=default)")
add_definitions(-DVELODYNE_MODEL=${VELODYNE_MODEL})
catkin_package(
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs
DEPENDS EIGEN3 PCL OpenCV
INCLUDE_DIRS include
)
add_executable(scanRegistration src/nodes/scanRegistration.cpp src/scanRegistrationLib.cpp)
target_link_libraries(scanRegistration ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS} ${ButVELODYNE_LIBRARIES})
add_executable(laserOdometry src/nodes/laserOdometry.cpp src/laserOdometryLib.cpp src/common.cpp src/common_ros.cpp src/build_transform.cpp)
target_link_libraries(laserOdometry ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS} ${ButVELODYNE_LIBRARIES})
add_executable(laserMapping src/nodes/laserMapping.cpp src/laserMappingLib.cpp src/common.cpp src/common_ros.cpp src/build_transform.cpp)
target_link_libraries(laserMapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS} ${ButVELODYNE_LIBRARIES})
add_executable(transformMaintenance src/nodes/transformMaintenance.cpp src/common.cpp src/common_ros.cpp src/build_transform.cpp)
target_link_libraries(transformMaintenance ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBS} ${ButVELODYNE_LIBRARIES})
if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
# TODO: Download test data
catkin_download_test_data(${PROJECT_NAME}_test_data.tar.gz
https://dl.dropboxusercontent.com/s/y4hn486461tfmpm/velodyne_loam_test_data.tar.gz
MD5 3d5194e6981975588b7a93caebf79ba4)
add_custom_target(${PROJECT_NAME}_test_data
COMMAND ${CMAKE_COMMAND} -E tar -xzf velodyne_loam_test_data.tar.gz
DEPENDS ${PROJECT_NAME}_test_data.tar.gz)
configure_file(tests/loam.test.in
${PROJECT_BINARY_DIR}/test/loam.test)
add_rostest(${PROJECT_BINARY_DIR}/test/loam.test
DEPENDENCIES
${PROJECT_NAME}_test_data
scanRegistration
laserOdometry
laserMapping
transformMaintenance)
endif()