-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
67 lines (54 loc) · 1.74 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
cmake_minimum_required(VERSION 3.5)
project(helipr_tool)
# Set the C++ Standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Find required packages
find_package(PCL 1.8 REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(OpenMP QUIET)
find_package(yaml-cpp REQUIRED)
# Include directories
include_directories(
${catkin_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${YAML_CPP_INCLUDE_DIR}
include
)
# Add definitions and directories from dependencies
add_definitions(${PCL_DEFINITIONS})
link_directories(${PCL_LIBRARY_DIRS})
# Compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
# Set the PCL directory (adjust as necessary)
set(PCL_DIR "/usr/lib/x86_64-linux-gnu/cmake/pcl")
# Source files
set(SAVER_FILES src/pointSaver.cpp src/visualizer.cpp src/PointCloudProcessor.cpp src/utility.cpp src/BsplineSE3.cpp)
set(MERGER_FILES src/pointMerger.cpp src/visualizer.cpp src/PointCloudProcessor.cpp src/utility.cpp src/BsplineSE3.cpp)
set(PROPAGATE_FILES src/pointPropagator.cpp src/visualizer.cpp src/PointCloudProcessor.cpp src/utility.cpp src/BsplineSE3.cpp)
# Add executable
add_executable(helimos_saver ${SAVER_FILES})
# Link libraries
target_link_libraries(helimos_saver
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${EIGEN3_LIBRARIES}
${YAML_CPP_LIBRARIES}
)
add_executable(helimos_merger ${MERGER_FILES})
# Link libraries
target_link_libraries(helimos_merger
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${EIGEN3_LIBRARIES}
${YAML_CPP_LIBRARIES}
)
add_executable(helimos_propagator ${PROPAGATE_FILES})
target_link_libraries(helimos_propagator
${catkin_LIBRARIES}
${PCL_LIBRARIES}
${EIGEN3_LIBRARIES}
${YAML_CPP_LIBRARIES}
)