-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (32 loc) · 963 Bytes
/
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.0.2)
project(lane_detection
VERSION 1.0.0
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_VERBOSE_MAKEFILE ON)
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
xycar_msgs
)
find_package(yaml-cpp REQUIRED)
# find_package(OpenCV 4.5.5 REQUIRED HINTS ~/OpenCV4/install/lib/cmake/opencv4)
find_package(OpenCV 4.5.5 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/OpenCV/install/lib/cmake/opencv4)
catkin_package()
add_subdirectory(modules)
add_executable(main_xycar src/main_xycar.cpp)
target_link_libraries(main_xycar PRIVATE
${PROJECT_NAME})
add_executable(teleop_xycar test/teleop_xycar.cpp)
target_link_libraries(teleop_xycar PRIVATE
${PROJECT_NAME}
)
if(CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions(-DDEBUG=1)
endif()
target_compile_options(${PROJECT_NAME} PRIVATE
-Wall -Wextra -Wpedantic -Werror
)