forked from LiJiangnanBit/path_optimizer_2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (58 loc) · 2.13 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
64
65
66
67
68
69
cmake_minimum_required(VERSION 2.8.3)
project(path_optimizer_2)
## Compile as C++11, supported in ROS Kinetic and newer
add_definitions(-std=c++11 -w)
set(CMAKE_CXX_FLAGS " -Wall -Wextra ${CMAKE_CXX_FLAGS}")
set(CMAKE_BUILD_TYPE "Release")
set(catkin_deps
roscpp
grid_map_ros
tinyspline_ros
ros_viz_tools
)
find_package(catkin REQUIRED COMPONENTS
${catkin_deps}
)
find_package(OsqpEigen REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(OpenCV 3 REQUIRED)
find_package(gflags REQUIRED)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS ${catkin_deps}
DEPENDS OpenCV
)
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
)
add_library(${PROJECT_NAME}
src/tools/tools.cpp
src/tools/spline.cpp
src/path_optimizer.cpp
src/tools/collision_checker.cpp
src/reference_path_smoother/reference_path_smoother.cpp
src/tools/Map.cpp
src/tools/car_geometry.cpp
src/solver/base_solver.cpp
src/data_struct/date_struct.cpp
src/data_struct/reference_path_impl.cpp
src/data_struct/reference_path.cpp
src/data_struct/vehicle_state_frenet.cpp
src/config/planning_flags.cpp
src/reference_path_smoother/tension_smoother.cpp
src/reference_path_smoother/tension_smoother_2.cpp
src/tools/time_recorder.cpp)
target_link_libraries(${PROJECT_NAME} glog gflags ${catkin_LIBRARIES} OsqpEigen::OsqpEigen osqp::osqp
)
add_executable(${PROJECT_NAME}_demo src/test/demo.cpp)
target_link_libraries(${PROJECT_NAME}_demo ${PROJECT_NAME} ${OpenCV_LIBRARIES} )
add_executable(${PROJECT_NAME}_demo2 src/test/demo2.cpp)
target_link_libraries(${PROJECT_NAME}_demo2 ${PROJECT_NAME} ${OpenCV_LIBRARIES} )
add_executable(${PROJECT_NAME}_demo3 src/test/demo3.cpp)
target_link_libraries(${PROJECT_NAME}_demo3 ${PROJECT_NAME} ${OpenCV_LIBRARIES} )
add_executable(${PROJECT_NAME}_demo4 src/test/demo4.cpp)
target_link_libraries(${PROJECT_NAME}_demo4 ${PROJECT_NAME} ${OpenCV_LIBRARIES} )