From 0c572b1343d1e98574b7bc46169947f2dd5a257d Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Tue, 29 Jul 2025 16:20:49 -0700 Subject: [Mac] Consistently specify rpaths for plug-ins C++ plug-ins now consistently use the `plugin_rpath` or `ui_plugin_rpath` macros to ensure they have `SKIP_BUILD_RPATH` set when building on Mac (i.e., no `LC_RPATH` is added). Rust plug-ins have their build.rs updated to only specify `-Wl,-rpath` when building for Linux. It is not needed on macOS. On macOS we instead explicitly specify an `@rpath`-relative install name. This doesn't change any behavior, but avoids leaving an absolute path as the library's install name and is consistent with CMake's behavior for C++ plug-ins. --- view/kernelcache/CMakeLists.txt | 2 ++ view/kernelcache/ui/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) (limited to 'view/kernelcache') diff --git a/view/kernelcache/CMakeLists.txt b/view/kernelcache/CMakeLists.txt index 5bd46370..aa52d2a3 100644 --- a/view/kernelcache/CMakeLists.txt +++ b/view/kernelcache/CMakeLists.txt @@ -66,6 +66,8 @@ target_include_directories(kernelcache PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMA target_link_libraries(kernelcache PUBLIC kernelcacheapi binaryninjaapi kernelcachecore) # kernelcacheworkflow) +plugin_rpath(kernelcache) + set(COMPILE_DEFS "") diff --git a/view/kernelcache/ui/CMakeLists.txt b/view/kernelcache/ui/CMakeLists.txt index e2f04d0d..cac2010e 100644 --- a/view/kernelcache/ui/CMakeLists.txt +++ b/view/kernelcache/ui/CMakeLists.txt @@ -93,3 +93,5 @@ target_include_directories(kernelcacheui PRIVATE ${INCLUDES}) target_link_libraries(kernelcacheui kernelcacheapi kernelcache binaryninjaui Qt6::Core Qt6::Gui Qt6::Widgets) +ui_plugin_rpath(kernelcacheui) + -- cgit v1.3.1