forked from ros2/geometry2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (55 loc) · 1.8 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
cmake_minimum_required(VERSION 3.5)
project(tf2_geometry_msgs)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()
find_package(ament_cmake_auto REQUIRED)
set(required_dependencies
"geometry_msgs"
"orocos_kdl"
"tf2"
"tf2_ros"
)
ament_auto_find_build_dependencies(REQUIRED ${required_dependencies})
# TODO(ros2/geometry2#110) Port python once PyKDL becomes usable in ROS 2
# ament_python_install_package(${PROJECT_NAME}
# PACKAGE_DIR src/${PROJECT_NAME})
# TODO(ros2/geometry2#110) Port python once PyKDL becomes usable in ROS 2
# install(PROGRAMS scripts/test.py
# DESTINATION lib/${PROJECT_NAME}
# )
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_cppcheck
)
ament_lint_auto_find_test_dependencies()
ament_cppcheck(LANGUAGE "c++")
find_package(ament_cmake_gtest REQUIRED)
find_package(rclcpp REQUIRED)
ament_add_gtest(test_tf2_geometry_msgs test/test_tf2_geometry_msgs.cpp)
if(TARGET test_tf2_geometry_msgs)
target_include_directories(test_tf2_geometry_msgs PUBLIC include)
ament_target_dependencies(test_tf2_geometry_msgs
"geometry_msgs"
"orocos_kdl"
"rclcpp"
"tf2"
"tf2_ros"
)
endif()
endif()
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
ament_target_dependencies(${PROJECT_NAME} INTERFACE ${required_dependencies})
install(
TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}
INCLUDES DESTINATION include
)
ament_export_targets(${PROJECT_NAME})
ament_export_dependencies(${required_dependencies})
ament_auto_package()