Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

motion_generator as shared library #295

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 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_generator
SHARED
"src/motion_generator.cpp"
)
target_compile_features(motion_generator PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_include_directories(motion_generator 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 @@ -50,6 +60,14 @@ ament_target_dependencies(
${dependencies}
)

target_link_libraries(
cia402_slave_node
motion_generator
)

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

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

Expand Down
Loading