-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
93 lines (75 loc) · 3.01 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(rabbit)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Release)
find_package(catkin REQUIRED COMPONENTS
roscpp
geometry_msgs
sensor_msgs
eigen_conversions
pcl_ros
pcl_conversions
tf
)
find_package(PCL REQUIRED QUIET)
add_definitions(${PCL_DEFINITIONS})
find_package(OpenCV REQUIRED QUIET)
find_package(Eigen3 REQUIRED)
find_package(Ceres REQUIRED)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS roscpp pcl_conversions
)
include_directories(
include
3rdparty
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
)
file(GLOB_RECURSE SRC
"src/*.cpp"
"src/*.cc"
"3rdparty/*.cpp"
)
link_directories(
${OpenCV_LIBRARY_DIRS}
${PCL_LIBRARY_DIRS}
${EIGEN3_INCLUDE_DIR}
${CERES_LIBRARY_DIRS}
)
add_library(librabbit SHARED ${SRC})
add_executable(IOTest app/UnitTest/IOTest.cpp)
add_dependencies(IOTest ${catkin_EXPORTED_TARGETS} )
target_link_libraries(IOTest librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(ReadPCD app/ReadPCD.cpp)
add_dependencies(ReadPCD ${catkin_EXPORTED_TARGETS} )
target_link_libraries(ReadPCD librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(PCD2PLY app/PCD2PLY.cpp)
add_dependencies(PCD2PLY ${catkin_EXPORTED_TARGETS} )
target_link_libraries(PCD2PLY librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(FrameTest app/UnitTest/FrameTest.cpp)
add_dependencies(FrameTest ${catkin_EXPORTED_TARGETS} )
target_link_libraries(FrameTest librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(OdometryTest app/UnitTest/OdometryTest.cpp)
add_dependencies(OdometryTest ${catkin_EXPORTED_TARGETS} )
target_link_libraries(OdometryTest librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(IMUTest app/UnitTest/IMUTest.cpp)
add_dependencies(IMUTest ${catkin_EXPORTED_TARGETS} )
target_link_libraries(IMUTest librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(RabbitRun app/RUN/Run.cpp)
add_dependencies(RabbitRun ${catkin_EXPORTED_TARGETS} )
target_link_libraries(RabbitRun librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(RabbitRunPCD app/RUN/RunPCD.cpp)
add_dependencies(RabbitRunPCD ${catkin_EXPORTED_TARGETS} )
target_link_libraries(RabbitRunPCD librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )
add_executable(Bag2PCD app/Bag2PCD.cpp)
add_dependencies(Bag2PCD ${catkin_EXPORTED_TARGETS} )
target_link_libraries(Bag2PCD librabbit ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES} ${CERES_LIBRARIES} )