Add compilation guards for RMW compatibility
Use CMake rmw_VERSION for conditional compilation Signed-off-by: Dan Rose <dan@digilabs.io>
This commit is contained in:
parent
94e53ce83f
commit
c51c884413
2 changed files with 64 additions and 22 deletions
|
@ -72,6 +72,13 @@ ament_target_dependencies(rmw_cyclonedds_cpp
|
|||
|
||||
configure_rmw_library(rmw_cyclonedds_cpp)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
RMW_VERSION_MAJOR=${rmw_VERSION_MAJOR}
|
||||
RMW_VERSION_MINOR=${rmw_VERSION_MINOR}
|
||||
RMW_VERSION_PATCH=${rmw_VERSION_PATCH}
|
||||
)
|
||||
|
||||
# Causes the visibility macros to use dllexport rather than dllimport,
|
||||
# which is appropriate when building the dll but not consuming it.
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue