mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
build: Fix rpath issues on macOS
This commit is contained in:
@@ -58,6 +58,11 @@ macro(add_imhex_plugin)
|
||||
SUFFIX ${IMHEX_PLUGIN_SUFFIX}
|
||||
)
|
||||
|
||||
# Set rpath of plugin libraries to the plugins folder
|
||||
if (APPLE)
|
||||
set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES BUILD_RPATH "@executable_path/../Frameworks;@executable_path/plugins")
|
||||
endif()
|
||||
|
||||
# Setup a romfs for the plugin
|
||||
list(APPEND LIBROMFS_RESOURCE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/romfs)
|
||||
set(LIBROMFS_PROJECT_NAME ${IMHEX_PLUGIN_NAME})
|
||||
@@ -77,11 +82,11 @@ macro(add_imhex_plugin)
|
||||
|
||||
if (IMHEX_EXTERNAL_PLUGIN_BUILD)
|
||||
install(TARGETS ${IMHEX_PLUGIN_NAME} DESTINATION ".")
|
||||
endif()
|
||||
|
||||
# Fix rpath
|
||||
if (APPLE)
|
||||
set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks")
|
||||
endif()
|
||||
# Fix rpath
|
||||
if (APPLE)
|
||||
set_target_properties(${IMHEX_PLUGIN_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/plugins")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ message(STATUS "Fixing up application bundle: ${extra_dirs}")
|
||||
|
||||
include(BundleUtilities)
|
||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||
fixup_bundle("${BUNDLE_PATH}" "${plugins};${plugin_libs}" "${extra_dirs}")
|
||||
|
||||
fixup_bundle("${BUNDLE_PATH}" "${plugins}" "${extra_dirs}")
|
||||
|
||||
if (CODE_SIGN_CERTIFICATE_ID)
|
||||
# Hack around Apple Silicon signing bugs by copying the real app, signing it and moving it back.
|
||||
|
||||
Reference in New Issue
Block a user