-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
73 lines (60 loc) · 2.33 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
69
70
71
72
73
cmake_minimum_required(VERSION 3.8)
project(ros2_gazebo_sandbox)
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(bitbots_msgs REQUIRED)
find_package(rosgraph_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(urdf REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(gz_plugin_vendor REQUIRED)
find_package(gz-plugin REQUIRED)
find_package(gz_sim_vendor REQUIRED)
find_package(gz-sim REQUIRED)
add_library(fake_flight_controller SHARED
plugins/fake_flight_controller.cpp
)
target_link_libraries(fake_flight_controller
gz-sim::core
gz-plugin::core
)
install(
TARGETS
fake_flight_controller
DESTINATION lib
)
set(INCLUDE_DIRS ${bitbots_msgs_INCLUDE_DIRS} ${rosgraph_msgs_INCLUDE_DIRS}
${std_msgs_INCLUDE_DIRS} ${ament_cmake_INCLUDE_DIRS}
${urdf_INCLUDE_DIRS} ${nav_msgs_INCLUDE_DIRS}
${rclpy_INCLUDE_DIRS} ${sensor_msgs_INCLUDE_DIRS} ${gazebo_msgs_INCLUDE_DIRS})
include_directories(${INCLUDE_DIRS})
link_directories(${LIBRARY_DIRS})
set(LIBS ${bitbots_msgs_LIBRARIES} ${rosgraph_msgs_LIBRARIES}
${std_msgs_LIBRARIES} ${ament_cmake_LIBRARIES}
${urdf_LIBRARIES} ${nav_msgs_LIBRARIES} ${geometry_msgs_LIBRARIES} ${rclpy_LIBRARIES}
${sensor_msgs_LIBRARIES} ${gazebo_msgs_LIBRARIES})
ament_export_dependencies(bitbots_msgs)
ament_export_dependencies(rosgraph_msgs)
ament_export_dependencies(std_msgs)
ament_export_dependencies(ament_cmake)
ament_export_dependencies(urdf)
ament_export_dependencies(nav_msgs)
ament_export_dependencies(geometry_msgs)
ament_export_dependencies(rclpy)
ament_export_dependencies(sensor_msgs)
ament_export_dependencies(gazebo_msgs)
ament_export_include_directories(${INCLUDE_DIRS})
install(DIRECTORY robots DESTINATION share/${PROJECT_NAME})
install(DIRECTORY worlds DESTINATION share/${PROJECT_NAME})
install(DIRECTORY models DESTINATION share/${PROJECT_NAME})
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/gz_sim_resource_path.dsv.in")
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/gz_sim_system_plugin_path.dsv")
ament_python_install_package(${PROJECT_NAME})
ament_package()