-
Notifications
You must be signed in to change notification settings - Fork 25
/
CMakeLists.txt
executable file
·57 lines (45 loc) · 1.33 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
cmake_minimum_required(VERSION 3.10)
project(ff_lins)
## Build Options
set(CMAKE_CXX_STANDARD 17)
if (CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")
endif()
## ThirdParty Libraries
# glog
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# abseil
add_subdirectory(thirdparty/abseil-cpp-20230125.0)
## FF-LINS
# FF-LINS Library
add_subdirectory(ff_lins)
## Executable
# ROS interface
find_package(catkin REQUIRED COMPONENTS
message_generation roscpp std_msgs livox_ros_driver)
catkin_package(
LIBRARIES
CATKIN_DEPENDS roscpp std_msgs livox_ros_driver)
include_directories(
${catkin_INCLUDE_DIRS})
# FF-LINS ROS
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/ff_lins)
add_executable(${PROJECT_NAME}_ros
ROS/main.cc
ROS/fusion.cc
ROS/lidar/lidar_converter.cc
ROS/lidar/lidar_viewer_rviz.cc)
add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(${PROJECT_NAME}_ros
${catkin_LIBRARIES}
ff_lins
stdc++fs)
# PCL
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
target_link_libraries(${PROJECT_NAME}_ros ${PCL_LIBRARIES})