diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-19 20:36:17 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-19 22:35:01 +0800 |
commit | b7afbe59c42a3e6e92f712153172364f4ebaa5e2 (patch) | |
tree | b10784783099c002ed1cc8fd694915ade40b6e67 /indra/cmake/WebRTC.cmake | |
parent | 495f103000137b3288eaa05a4298fd33ceb3c2dc (diff) | |
parent | 135fcd19541f414c3278b25b02b7bd34fbc3065f (diff) |
Merge branch 'webrtc-voice' into 2024.06-atlasaurus
Diffstat (limited to 'indra/cmake/WebRTC.cmake')
-rw-r--r-- | indra/cmake/WebRTC.cmake | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index 3120968560..fa8fa64ac0 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -6,9 +6,34 @@ include_guard() add_library( ll::webrtc INTERFACE IMPORTED ) target_include_directories( ll::webrtc SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/webrtc" "${LIBS_PREBUILT_DIR}/include/webrtc/third_party/abseil-cpp") -if (NOT USESYSTEMLIBS) +if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) + if (NOT EXISTS ${CMAKE_BINARY_DIR}/libwebrtc-macos-arm64.tar.xz) + file(DOWNLOAD + https://github.com/crow-misia/libwebrtc-bin/releases/download/114.5735.6.1/libwebrtc-macos-arm64.tar.xz + ${CMAKE_BINARY_DIR}/libwebrtc-macos-arm64.tar.xz + SHOW_PROGRESS + ) + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/libwebrtc-macos-arm64.tar.xz) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/libwebrtc-macos-arm64.tar.xz + DESTINATION ${LIBS_PREBUILT_DIR} + ) + file(RENAME + ${LIBS_PREBUILT_DIR}/lib/libwebrtc.a + ${LIBS_PREBUILT_DIR}/lib/release/libwebrtc.a + ) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/Frameworks/WebRTC.xcframework/macos-arm64/WebRTC.framework) + file(RENAME + ${LIBS_PREBUILT_DIR}/Frameworks/WebRTC.xcframework/macos-arm64/WebRTC.framework + ${LIBS_PREBUILT_DIR}/lib/release/WebRTC.framework + ) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/Frameworks) + file(WRITE ${PREBUILD_TRACKING_DIR}/webrtc_installed "0") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/webrtc_installed OR NOT ${webrtc_installed} EQUAL 0) +elseif (NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) use_prebuilt_binary(webrtc) -endif () +endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) if (WINDOWS) target_link_libraries( ll::webrtc INTERFACE webrtc.lib ) |