OS X: correctly parse output of otool -D.
In the past this relied on otool -XD not printing the name of the library itself, only the install name, but that doesn't work anymore as of 10.12.
This commit is contained in:
parent
19e77e7866
commit
5e28b35f2b
|
@ -342,8 +342,9 @@ if(APPLE)
|
||||||
set(fixups)
|
set(fixups)
|
||||||
foreach(lib ${platform_BUNDLED_LIBS})
|
foreach(lib ${platform_BUNDLED_LIBS})
|
||||||
get_filename_component(name ${lib} NAME)
|
get_filename_component(name ${lib} NAME)
|
||||||
execute_process(COMMAND otool -XD ${lib}
|
execute_process(COMMAND otool -D ${lib}
|
||||||
OUTPUT_VARIABLE canonical_lib OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_VARIABLE canonical_lib OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
string(REGEX REPLACE "^.+:\n" "" canonical_lib ${canonical_lib})
|
||||||
add_custom_command(TARGET solvespace POST_BUILD
|
add_custom_command(TARGET solvespace POST_BUILD
|
||||||
COMMAND install_name_tool -change ${canonical_lib} @executable_path/${name}
|
COMMAND install_name_tool -change ${canonical_lib} @executable_path/${name}
|
||||||
$<TARGET_FILE:solvespace>
|
$<TARGET_FILE:solvespace>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user