mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-30 20:41:00 +00:00
Proper name of FMOD .dylib in loading path adjustment for macOS
This commit is contained in:
parent
9c91686e0f
commit
b308a7df52
1 changed files with 8 additions and 2 deletions
|
@ -1392,17 +1392,23 @@ if( APPLE )
|
||||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/posix/osx/zdoom-info.plist" )
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/posix/osx/zdoom-info.plist" )
|
||||||
|
|
||||||
if( NOT NO_FMOD )
|
if( NOT NO_FMOD )
|
||||||
|
if( FMOD_STUDIO )
|
||||||
|
set( FMOD_DYLIB libfmod.dylib )
|
||||||
|
else()
|
||||||
|
set( FMOD_DYLIB libfmodex.dylib )
|
||||||
|
endif()
|
||||||
|
|
||||||
# Fix fmod link so that it can be found in the app bundle.
|
# Fix fmod link so that it can be found in the app bundle.
|
||||||
find_program( OTOOL otool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
|
find_program( OTOOL otool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
|
||||||
find_program( INSTALL_NAME_TOOL install_name_tool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
|
find_program( INSTALL_NAME_TOOL install_name_tool HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin" )
|
||||||
execute_process( COMMAND "${OTOOL}" -L "${FMOD_LIBRARY}"
|
execute_process( COMMAND "${OTOOL}" -L "${FMOD_LIBRARY}"
|
||||||
COMMAND grep "libfmodex.dylib (compat"
|
COMMAND grep "${FMOD_DYLIB} (compat"
|
||||||
COMMAND head -n1
|
COMMAND head -n1
|
||||||
COMMAND awk "{print $1}"
|
COMMAND awk "{print $1}"
|
||||||
OUTPUT_VARIABLE FMOD_LINK
|
OUTPUT_VARIABLE FMOD_LINK
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||||
add_custom_command( TARGET zdoom POST_BUILD
|
add_custom_command( TARGET zdoom POST_BUILD
|
||||||
COMMAND "${INSTALL_NAME_TOOL}" -change "${FMOD_LINK}" @executable_path/../Frameworks/libfmodex.dylib "$<TARGET_FILE:zdoom>"
|
COMMAND "${INSTALL_NAME_TOOL}" -change "${FMOD_LINK}" @executable_path/../Frameworks/${FMOD_DYLIB} "$<TARGET_FILE:zdoom>"
|
||||||
COMMENT "Relinking FMOD Ex" )
|
COMMENT "Relinking FMOD Ex" )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue