-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
55 lines (41 loc) · 1.5 KB
/
CMakeLists.txt
File metadata and controls
55 lines (41 loc) · 1.5 KB
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
cmake_minimum_required(VERSION 3.10.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
if(CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()
project(teleop-control VERSION 0.1.0 LANGUAGES C CXX)
add_executable(teleop-control ${CMAKE_SOURCE_DIR}/src/main.cpp)
find_package(fmt REQUIRED)
find_package(ament_cmake REQUIRED)
find_package(OpenCV REQUIRED imgcodecs imgproc videoio)
find_package(Torch REQUIRED)
find_package(rclcpp REQUIRED)
find_package(image_transport REQUIRED)
find_package(cv_bridge REQUIRED)
add_subdirectory(${CMAKE_SOURCE_DIR}/src)
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(src)
include_directories(src/helpers src/video)
target_link_libraries(teleop-control ${OpenCV_LIBS})
target_link_libraries(teleop-control ${TORCH_LIBRARIES})
target_link_libraries(teleop-control
image_transport::image_transport
rclcpp::rclcpp
cv_bridge::cv_bridge
)
target_link_libraries(teleop-control fmt::fmt)
# Dont forget to add ament export include and dependcies calls from template
include(CTest)
enable_testing()
install(TARGETS teleop-control DESTINATION bin)
# # problematic
# ament_export_include_directories(include)
# ament_export_dependencies(image_transport rosidl_default_runtime rclcpp sensor_msgs)
# if(BUILD_TESTING)
# find_package(ament_lint_auto REQUIRED)
# ament_lint_auto_find_test_dependencies()
# endif()
# ament_package()