diff options
author | Alexander Grund <git@grundis.de> | 2018-12-30 14:17:35 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-12-31 00:56:40 (GMT) |
commit | 5072598f0795f44e157bef8423feda7de24c5504 (patch) | |
tree | 7fa9b737616a2e827feab01eb309c734aa86a71c | |
parent | 428680da92b98755be1a908ee4a5d705d8753bb9 (diff) | |
download | CMake-5072598f0795f44e157bef8423feda7de24c5504.zip CMake-5072598f0795f44e157bef8423feda7de24c5504.tar.gz CMake-5072598f0795f44e157bef8423feda7de24c5504.tar.bz2 |
BundleUtilites: Don't use hardcoded name for install_name_tool
-rw-r--r-- | Modules/BundleUtilities.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 10e5510..d5c47f8 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -877,9 +877,13 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs) execute_process(COMMAND chmod u+w "${resolved_embedded_item}") endif() + # CMAKE_INSTALL_NAME_TOOL may not be set if executed in script mode + # Duplicated from CMakeFindBinUtils.cmake + find_program(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + # Only if install_name_tool supports -delete_rpath: # - execute_process(COMMAND install_name_tool + execute_process(COMMAND ${CMAKE_INSTALL_NAME_TOOL} OUTPUT_VARIABLE install_name_tool_usage ERROR_VARIABLE install_name_tool_usage ) @@ -897,7 +901,7 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs) # to install_name_tool: # if(changes) - set(cmd install_name_tool ${changes} "${resolved_embedded_item}") + set(cmd ${CMAKE_INSTALL_NAME_TOOL} ${changes} "${resolved_embedded_item}") execute_process(COMMAND ${cmd} RESULT_VARIABLE install_name_tool_result) if(NOT install_name_tool_result EQUAL 0) string(REPLACE ";" "' '" msg "'${cmd}'") |