From dd00ede58ab52ef03f79a3df8084812b7b063311 Mon Sep 17 00:00:00 2001 From: Susanne Pielawa <32822068+spielawa@users.noreply.github.com> Date: Fri, 5 Jan 2018 18:06:30 +0100 Subject: [PATCH] Change link ordering to fix libcartographer_rviz.so. (#648) This fixes the issue that rviz crashes when loading the cartographer_rviz plugin saying that the symbol `cartographer::io::UnpackTextureData(std::__cxx11::basic_string, std::allocator > const&, int, int)` is undefined. PAIR=@wohe,@SirVer --- cartographer_rviz/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cartographer_rviz/CMakeLists.txt b/cartographer_rviz/CMakeLists.txt index 074c6e3..47d8a9f 100644 --- a/cartographer_rviz/CMakeLists.txt +++ b/cartographer_rviz/CMakeLists.txt @@ -66,8 +66,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ ) -target_link_libraries(${PROJECT_NAME} PUBLIC cartographer) - target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "${EIGEN3_INCLUDE_DIR}") target_link_libraries(${PROJECT_NAME} PUBLIC ${EIGEN3_LIBRARIES}) @@ -84,6 +82,8 @@ set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS ${TARGET_COMPILE_FLAGS}) +target_link_libraries(${PROJECT_NAME} PUBLIC cartographer) + install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}