-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (48 loc) · 1.41 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
cmake_minimum_required(VERSION 3.19...3.25)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
message(FATAL_ERROR
"SymForce does not support CMake >=3.27: https://github.com/symforce-org/symforce/issues/356"
)
endif()
project(IMU-preintegration)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Set the installation directory path
set(CMAKE_INSTALL_PREFIX "/home/marius/Development/symforce")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/gen)
include(FetchContent)
include(cmake/AddThirdParty.cmake)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(Eigen3 REQUIRED)
find_package(Symforce REQUIRED)
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
add_executable(run_imu_preintegration src/main.cc src/visualize.cc src/loadKittiData.cc src/createFactors.cc)
# Add dependencies
add_dependencies(
run_imu_preintegration
Eigen3::Eigen
spdlog::spdlog
fmt::fmt
spdlog::spdlog
symforce::opt
symforce::gen
symforce::cholesky
symforce::slam
)
# Link libraries
target_link_libraries(
run_imu_preintegration
${PCL_LIBRARIES}
Eigen3::Eigen
spdlog::spdlog
fmt::fmt
spdlog::spdlog
symforce::opt
symforce::gen
symforce::cholesky
symforce::slam
)
# Install target
install(TARGETS run_imu_preintegration DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)