-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
43 lines (33 loc) · 1.34 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
cmake_minimum_required(VERSION 3.8)
project(heightmap_spawner)
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(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(OpenCV REQUIRED)
find_package(gz-transport13 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport13_VERSION_MAJOR})
add_executable(heightmap_spawner src/heightmap_spawner.cpp)
target_include_directories(heightmap_spawner PUBLIC
${OpenCV_INCLUDE_DIRS})
target_compile_features(heightmap_spawner PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_link_libraries(heightmap_spawner ${OpenCV_LIBRARIES} gz-transport${GZ_TRANSPORT_VER}::gz-transport${GZ_TRANSPORT_VER})
ament_target_dependencies(heightmap_spawner rclcpp std_msgs nav_msgs)
install(TARGETS heightmap_spawner
DESTINATION lib/${PROJECT_NAME})
install(
DIRECTORY example launch textures
DESTINATION share/${PROJECT_NAME}
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
set(ament_cmake_copyright_FOUND TRUE)
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.dsv.in")
ament_package()