mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-17 04:19:35 +00:00
fix(apps/wallet): use @loader_path rpath for the QML plugin on macOS
The Logos.Wallet QML plugin was installed with an ELF "$ORIGIN" rpath. macOS dyld does not expand "$ORIGIN", so loading the plugin failed with Cannot load library liblogos_wallet_qmlplugin.dylib: Library not loaded: @rpath/liblogos_wallet_qml.dylib even though liblogos_wallet_qml.dylib sits in the same directory. Select the rpath per platform: @loader_path on Apple, $ORIGIN elsewhere, so @rpath/liblogos_wallet_qml.dylib resolves to the sibling library.
This commit is contained in:
parent
d47cc70ce7
commit
c0947e1917
@ -106,11 +106,18 @@ if(LOGOS_WALLET_BUILD_QML)
|
||||
Qt6::Quick
|
||||
Qt6::QuickControls2
|
||||
)
|
||||
# Resolve the sibling liblogos_wallet_qml.dylib/.so next to the plugin.
|
||||
# macOS dyld does not expand the ELF "$ORIGIN" token — it uses @loader_path.
|
||||
if(APPLE)
|
||||
set(wallet_qml_rpath "@loader_path")
|
||||
else()
|
||||
set(wallet_qml_rpath "$ORIGIN")
|
||||
endif()
|
||||
set_target_properties(logos_wallet_qml logos_wallet_qmlplugin PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${wallet_qml_output_dir}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${wallet_qml_output_dir}"
|
||||
BUILD_WITH_INSTALL_RPATH ON
|
||||
INSTALL_RPATH "$ORIGIN"
|
||||
INSTALL_RPATH "${wallet_qml_rpath}"
|
||||
)
|
||||
|
||||
set(wallet_qml_install_dir "lib/qml/Logos/Wallet")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user