-
Notifications
You must be signed in to change notification settings - Fork 65
/
CMakeLists.txt
57 lines (46 loc) · 1.29 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.15)
project(dsol)
set(CMAKE_CXX_STANDARD 17)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(BUILD_ROS "Build ros" ON)
option(BUILD_PLAY "Build play" OFF)
option(BUILD_TESTING "Build tests" OFF)
option(BUILD_BENCHMARK "Build benchmarks" OFF)
option(BUILD_VECTORIZE "Build with -march=native" ON)
set(CC_TARGET_PREFIX sv)
include(CMakeHelpers)
add_library(sv_options INTERFACE)
include(CompilerWarnings)
enable_warnings(sv_options)
include(Sanitizers)
enable_sanitizers(sv_options)
find_package(
catkin QUIET
COMPONENTS roscpp
tf2_ros
tf2_eigen
cv_bridge
image_transport
nav_msgs
sensor_msgs
visualization_msgs)
find_package(TBB REQUIRED)
find_package(fmt REQUIRED)
find_package(glog REQUIRED)
find_package(absl REQUIRED)
find_package(Boost REQUIRED) # circular buffer
find_package(Eigen3 REQUIRED)
find_package(Sophus REQUIRED)
find_package(OpenCV REQUIRED)
find_package(xtensor) # reading npy
find_package(GTest REQUIRED)
find_package(benchmark REQUIRED)
if(NOT catkin_FOUND)
set(BUILD_ROS OFF)
message(WARN "BUILD_ROS set to OFF because catkin not found.")
endif()
if(BUILD_ROS)
catkin_package()
endif()
enable_testing()
add_subdirectory(sv)