-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (53 loc) · 1.92 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
cmake_minimum_required(VERSION 3.25)
project(capability-based-routing)
set(DOWNLOAD_EXTRACT_TIMESTAMP ON)
set(CMAKE_PREFIX_PATH /opt/ros/noetic)
include(FetchContent)
message("Fetching nlohmann_json ...")
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.2
FIND_PACKAGE_ARGS
)
FetchContent_MakeAvailable(json)
message("Fetching eigen3 ...")
FetchContent_Declare(eigen3
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.4.0
FIND_PACKAGE_ARGS
)
FetchContent_MakeAvailable(eigen3)
message("Fetching Boost ...")
FetchContent_Declare(Boost
GIT_REPOSITORY https://github.com/boostorg/boost.git
GIT_TAG boost-1.71.0
FIND_PACKAGE_ARGS
)
FetchContent_MakeAvailable(Boost)
find_package(catkin REQUIRED COMPONENTS
lanelet2_core
lanelet2_io
lanelet2_projection
lanelet2_routing
lanelet2_traffic_rules
)
add_library(
capability-based-routing
SHARED
src/loader/FileLoader.cpp
src/LaneletChainFinder.cpp
src/cost/MatchingCost.cpp
src/matching/MatchingCriteria.cpp
src/logging/Logger.cpp
)
add_executable(
capability-based-routing-example
example/src/example.cpp
)
target_compile_features(capability-based-routing-example PUBLIC cxx_std_20)
target_link_libraries(capability-based-routing-example PUBLIC capability-based-routing)
target_include_directories(capability-based-routing-example PUBLIC include example/include)
target_compile_features(capability-based-routing PUBLIC cxx_std_20)
target_include_directories(capability-based-routing PRIVATE src)
target_include_directories(capability-based-routing PUBLIC include/capbasedrouting ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
target_link_libraries(capability-based-routing PUBLIC nlohmann_json::nlohmann_json Eigen3::Eigen ${catkin_LIBRARIES})