-
Notifications
You must be signed in to change notification settings - Fork 128
/
CMakeLists.txt
44 lines (34 loc) · 982 Bytes
/
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
cmake_minimum_required(VERSION 3.12)
project(rosidl_generator_c C)
# Default to C11
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 11)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake_python REQUIRED)
find_package(ament_cmake_ros REQUIRED)
ament_export_dependencies(rosidl_typesupport_interface)
ament_index_register_resource("rosidl_generator_packages")
ament_python_install_package(${PROJECT_NAME})
if(BUILD_SHARED_LIBS)
set(${PROJECT_NAME}_LIBRARY_TYPE "SHARED")
else()
set(${PROJECT_NAME}_LIBRARY_TYPE "STATIC")
endif()
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
ament_package(
CONFIG_EXTRAS "rosidl_generator_c-extras.cmake.in"
)
install(
PROGRAMS bin/rosidl_generator_c
DESTINATION lib/rosidl_generator_c
)
install(
DIRECTORY cmake resource
DESTINATION share/${PROJECT_NAME}
)