Skip to content

Commit

Permalink
motion_generator as shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
roncapat authored Jul 23, 2024
1 parent eef67ba commit 05a73ff
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion canopen_fake_slaves/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ find_package(lifecycle_msgs REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)

add_library(
motion_generaor
SHARED
"src/motion_generator.cpp"
)
target_compile_features(motion_generaor PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_include_directories(motion_generaor PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)


set(dependencies
lely_core_libraries
lifecycle_msgs
Expand All @@ -38,7 +49,6 @@ ament_target_dependencies(
add_executable(
cia402_slave_node
"src/cia402_slave.cpp"
"src/motion_generator.cpp"
)
target_compile_features(cia402_slave_node PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_include_directories(cia402_slave_node PUBLIC
Expand All @@ -47,9 +57,13 @@ target_include_directories(cia402_slave_node PUBLIC

ament_target_dependencies(
cia402_slave_node
motion_generaor
${dependencies}
)

install(TARGETS motion_generaor
DESTINATION lib/${PROJECT_NAME})

install(TARGETS basic_slave_node
DESTINATION lib/${PROJECT_NAME})

Expand Down

0 comments on commit 05a73ff

Please sign in to comment.