Skip to content

Commit

Permalink
GH-156 Prohibit system include paths for rosbag plugins
Browse files Browse the repository at this point in the history
This can lead to switching ros1 and ros2 include paths resulting
in missing symbols as the wrong pluginlib gets included
  • Loading branch information
Martin-Idel-SI authored and Karsten1987 committed Dec 14, 2018
1 parent ae4e683 commit 3fac836
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rosbag2_bag_v2_plugins/CMakeLists.txt
Expand Up @@ -107,6 +107,12 @@ target_include_directories(${PROJECT_NAME}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/rosbag2_bag_v2_plugins>
)

# This is necessary on some systems where CMake declares ros2 paths as "system paths" thereby
# messing up the include order. This results in this package being built with the wrong pluginlib
# i.e. the pluginlib from ROS 1. Symptoms of this problem are missing symbols for class loader
# classes (i.e. class_loader::impl::...) when linking the tests in this package
set_target_properties(${PROJECT_NAME} PROPERTIES NO_SYSTEM_FROM_IMPORTED 1)

# 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} PRIVATE
Expand Down

0 comments on commit 3fac836

Please sign in to comment.