diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-03-08 22:49:05 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-03-08 22:49:05 -0800 |
commit | 994039c948c29dc4664f7c2f2ec2c87001117234 (patch) | |
tree | 05f937786f71689448e141721a8dc1157653c402 /indra | |
parent | 42c7a335f840acf1b927b1ed6c8e06a6f00534d0 (diff) |
Use webrtc autobuild package
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/WebRTC.cmake | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/indra/cmake/WebRTC.cmake b/indra/cmake/WebRTC.cmake index 4032398c01..909a1345ed 100644 --- a/indra/cmake/WebRTC.cmake +++ b/indra/cmake/WebRTC.cmake @@ -1,46 +1,15 @@ # -*- cmake -*- +include(Linking) +include(Prebuilt) -include(FetchContent) - -if (WINDOWS) - if( ADDRESS_SIZE EQUAL 32 ) - FetchContent_Declare( - webrtc - URL "https://webrtc-build-releases.s3.us-west-2.amazonaws.com/webrtc.windows_x86.tar.bz2" - URL_HASH "MD5=cefbd446b1b152ac08217fc78648fb99" - FIND_PACKAGE_ARGS NAMES webrtc - DOWNLOAD_EXTRACT_TIMESTAMP TRUE - DOWNLOAD_DIR "${LIBS_PREBUILT_DIR}/webrtc/" - ) - else ( ADDRESS_SIZE EQUAL 32 ) - FetchContent_Declare( - webrtc - URL "https://webrtc-build-releases.s3.us-west-2.amazonaws.com/webrtc.windows_x86_64.tar.bz2" - URL_HASH "MD5=6e25b99284215933ec1571b6e60c1030" - FIND_PACKAGE_ARGS NAMES webrtc - DOWNLOAD_EXTRACT_TIMESTAMP TRUE - DOWNLOAD_DIR "${LIBS_PREBUILT_DIR}/webrtc/" - ) - endif ( ADDRESS_SIZE EQUAL 32 ) -elseif (DARWIN) - FetchContent_Declare( - webrtc - URL "https://webrtc-build-releases.s3.us-west-2.amazonaws.com/webrtc.macos_x86_64.tar.bz2" - URL_HASH "MD5=6849e81773135290f5c70cbf679992fb" - FIND_PACKAGE_ARGS NAMES webrtc - DOWNLOAD_EXTRACT_TIMESTAMP TRUE - DOWNLOAD_DIR "${LIBS_PREBUILT_DIR}/webrtc/" - ) -endif (WINDOWS) - -FetchContent_MakeAvailable(webrtc) - -set(WEBRTC_PATH ${webrtc_SOURCE_DIR}) +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") +use_prebuilt_binary(webrtc-shim) if (WINDOWS) - target_link_libraries( ll::webrtc INTERFACE "${WEBRTC_PATH}/lib/webrtc.lib" ) + target_link_libraries( ll::webrtc INTERFACE webrtc.lib ) elseif (DARWIN) FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio) FIND_LIBRARY(COREGRAPHICS_LIBRARY CoreGraphics) @@ -49,7 +18,7 @@ elseif (DARWIN) FIND_LIBRARY(COCOA_LIBRARY Cocoa) target_link_libraries( ll::webrtc INTERFACE - "${WEBRTC_PATH}/lib/libwebrtc.a" + libwebrtc.a ${COREAUDIO_LIBRARY} ${AUDIOTOOLBOX_LIBRARY} ${COREGRAPHICS_LIBRARY} @@ -57,10 +26,7 @@ elseif (DARWIN) ${COCOA_LIBRARY} ) elseif (LINUX) - target_link_libraries( ll::webrtc INTERFACE "${WEBRTC_PATH}/lib/libwebrtc.a" ) + target_link_libraries( ll::webrtc INTERFACE libwebrtc ) endif (WINDOWS) -message("PATH: ${WEBRTC_PATH}/include") - -target_include_directories( ll::webrtc INTERFACE "${WEBRTC_PATH}/include" "${WEBRTC_PATH}/include/third_party/abseil-cpp") |