fix: emit standalone .so to build root so PluginLoaderHelper finds action handlers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 16:04:36 +07:00
parent 05d7dd1735
commit 60413b2c1b

View File

@@ -231,6 +231,14 @@ else()
${TF3_LIBRARY}
)
# .so phải nằm ở root build dir như mission_adapters/recovery_core — PluginLoaderHelper chỉ tìm
# theo PNKX_NAV_CORE_LIBRARY_PATH / build dir / devel/lib, không quét thư mục con của build tree.
set_target_properties(action_core PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
BUILD_RPATH "${CMAKE_BINARY_DIR}"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
)
endif()
@@ -297,6 +305,14 @@ function(add_action_core_plugin target source)
${CMAKE_DL_LIBS}
${TF3_LIBRARY}
)
# Handler nạp qua Boost.DLL theo `library_path` trong YAML — .so phải ra root build dir,
# nếu không PluginLoaderHelper báo "Library not found for symbol" dù build xanh.
set_target_properties(${target} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
BUILD_RPATH "${CMAKE_BINARY_DIR}"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
)
endif()
set(ACTION_CORE_PLUGIN_TARGETS