diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-07 20:02:42 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-07 20:05:09 +0800 |
commit | 4d93da06a3dd623d9c75841d6c91ef43ff7fa9f3 (patch) | |
tree | 1b05372e7a9b06e6232886a20f6d591b9bda4589 /indra/cmake | |
parent | ce115c00aaf597ad8583482732a680cf995d3741 (diff) |
Install FMOD automatically on macOS
It's assumed that fmodstudioapi20223mac-installer.dmg has been
downloaded to ~/Downloads/.
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/FMODSTUDIO.cmake | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index 38437b7bfb..02e7fbd9eb 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -30,9 +30,34 @@ if (USE_FMODSTUDIO) # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL) # as accessing the private LL location will fail if you don't have the credential include(Prebuilt) - if (NOT USESYSTEMLIBS) + if (USESYSTEMLIBS) + if (DARWIN) + execute_process( + COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/fmodstudioapi20223mac-installer.dmg + COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio + ) + execute_process( + COMMAND cp + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod.hpp + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_codec.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_common.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_dsp.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_dsp_effects.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_errors.h + /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/inc/fmod_output.h + ${AUTOBUILD_INSTALL_DIR}/include/fmodstudio/ + COMMAND cp /Volumes/FMOD\ Programmers\ API\ Mac/FMOD\ Programmers\ API/api/core/lib/libfmod.dylib ${AUTOBUILD_INSTALL_DIR}/lib/release/ + ) + execute_process( + COMMAND hdiutil detach /Volumes/FMOD\ Programmers\ API\ Mac + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE ${_binary}_installed + ) + endif (DARWIN) + else (USESYSTEMLIBS) use_prebuilt_binary(fmodstudio) - endif () + endif (USESYSTEMLIBS) if (WINDOWS) target_link_libraries( ll::fmodstudio INTERFACE fmod_vc) elseif (DARWIN) @@ -42,9 +67,7 @@ if (USE_FMODSTUDIO) target_link_libraries( ll::fmodstudio INTERFACE fmod) endif (WINDOWS) - if (NOT USESYSTEMLIBS) target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/fmodstudio) - endif () endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) else() set( USE_FMODSTUDIO "OFF") |