-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (43 loc) · 1.59 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
cmake_minimum_required(VERSION 3.8)
project(rosros)
if($ENV{ROS_VERSION} EQUAL "1")
find_package(catkin REQUIRED COMPONENTS
genpy roslib rospy rosservice
)
catkin_python_setup()
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
catkin_add_nosetests(test/test_api.py)
catkin_add_nosetests(test/test_bag.py)
add_rostest(test/test_core.launch)
add_rostest(test/test_rclify.launch)
add_rostest(test/test_rospify.launch)
add_rostest(test/test_topics.launch)
add_rostest(test/test_services.launch)
endif()
catkin_package(CATKIN_DEPENDS genpy roslib rospy)
else()
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rclpy REQUIRED)
find_package(rosidl_parser REQUIRED)
find_package(rosidl_runtime_py REQUIRED)
find_package(ament_lint_auto REQUIRED)
if(BUILD_TESTING)
find_package(ament_cmake_pytest REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
ament_add_pytest_test(test_api test/test_api.py)
ament_add_pytest_test(test_bag test/test_bag.py)
ament_add_pytest_test(test_core test/test_core.py)
ament_add_pytest_test(test_rclify test/test_rclify.py)
ament_add_pytest_test(test_rospify test/test_rospify.py)
ament_add_pytest_test(test_topics test/test_topics.py)
ament_add_pytest_test(test_services test/test_services.py)
endif()
ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR src/${PROJECT_NAME})
ament_package()
endif()