-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
55 lines (35 loc) · 1.1 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
cmake_minimum_required(VERSION 3.22)
project(rsl_drive_sdk)
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(yaml_cpp_vendor REQUIRED)
add_definitions(-DMELO_MIN_SEVERITY=MELO_SEVERITY_INFO)
add_definitions(-DMELO_USE_COUT)
find_package(ethercat_sdk_master REQUIRED)
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS ./src/*.c*)
add_library(${PROJECT_NAME} SHARED
${SRC_FILES}
)
target_include_directories(${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_options(${PROJECT_NAME} PUBLIC -fPIC)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror=return-type)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
ament_target_dependencies(${PROJECT_NAME}
ethercat_sdk_master
yaml_cpp_vendor
)
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib)
install(DIRECTORY include/ DESTINATION include/
)
ament_export_include_directories(include)
ament_export_libraries(
${PROJECT_NAME}
)
ament_export_dependencies(
ethercat_sdk_master
yaml_cpp_vendor
)
ament_package()