-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
43 lines (30 loc) · 1.19 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
cmake_minimum_required(VERSION 3.21)
project(control)
set(CMAKE_CXX_STANDARD 14)
# include(GNUInstallDirs)
set(PACKAGE_NAME control)
# output
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# 创建control库
add_library(control INTERFACE)
find_package(Python COMPONENTS Interpreter Development NumPy REQUIRED)
target_link_libraries(control INTERFACE
Python::Python
Python::Module
Python::NumPy
)
install(
TARGETS control
EXPORT install_targets
)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
#pure_pursuit
add_executable(pure_pursuit_demo Pure_Pursuit/main.cpp Pure_Pursuit/PurePursuit.cpp utils/VehicleModel.cpp utils/ReferenceLine.cpp)
target_link_libraries(pure_pursuit_demo PRIVATE control)
#stanley
add_executable(stanley_demo Stanley/main.cpp Stanley/Stanley.cpp utils/VehicleModel.cpp utils/ReferenceLine.cpp)
target_link_libraries(stanley_demo PRIVATE control)
#rear_wheel_feedback
add_executable(rear_wheel_feedback_demo Rear_Wheel_Feedback/main.cpp Rear_Wheel_Feedback/RearWheelFeedback.cpp utils/ReferenceLine.cpp utils/VehicleModel.cpp)
target_link_libraries(rear_wheel_feedback_demo PRIVATE control)