diff --git a/CMakeLists.txt b/CMakeLists.txt index af65bcb..8f954fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,12 @@ else() target_link_libraries(lane_route_planner PUBLIC ${header_target}) endif() endforeach() + # PluginLoaderHelper searches only the top of the build directory, not its subdirectories. + # Without this the .so stays in the subdirectory and move_base2 cannot load LaneRoutePlanner. + set_target_properties(lane_route_planner PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} + BUILD_RPATH "${CMAKE_BINARY_DIR}" + ) endif() target_compile_options(lane_route_planner PRIVATE -O3)