generated from ijnek/ros2_template_repo
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
58 lines (50 loc) · 1.43 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
cmake_minimum_required(VERSION 3.8)
project(ros_image_to_qimage)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(python_qt_binding REQUIRED)
find_package(ament_cmake_pytest REQUIRED)
add_library(ros_image_to_qimage src/ros_image_to_qimage.cpp)
target_include_directories(ros_image_to_qimage PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(ros_image_to_qimage
sensor_msgs
Qt5Widgets
cv_bridge)
install(
DIRECTORY include/
DESTINATION include
)
install(
TARGETS ros_image_to_qimage
EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
ament_python_install_package(${PROJECT_NAME})
ament_export_include_directories(
include
)
ament_export_libraries(
ros_image_to_qimage
)
ament_export_dependencies(Qt5Widgets)
ament_export_dependencies(sensor_msgs)
ament_export_dependencies(cv_bridge)
ament_export_dependencies(python_qt_binding)
if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
add_subdirectory(test)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()