mirror of
https://github.com/overte-org/overte.git
synced 2025-07-31 13:04:54 +02:00
This uses a variable that can be overriden with an environment variable. This makes it easy for the community to create alternate asset hosts. Due to vcpkg using a clean environment, variables can't be easily passed to cmake scripts run by vcpkg. This was worked around by writing the data that needs to be passed into temporary files and reading it from the vcpkg ports.
38 lines
1.7 KiB
CMake
38 lines
1.7 KiB
CMake
include(vcpkg_common_functions)
|
|
set(WEBRTC_VERSION 20190626)
|
|
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
|
|
|
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)
|
|
|
|
if (ANDROID)
|
|
# this is handled by hifi_android.py
|
|
elseif (WIN32)
|
|
vcpkg_download_distfile(
|
|
WEBRTC_SOURCE_ARCHIVE
|
|
URLS "${EXTERNAL_BUILD_ASSETS}/seth/webrtc-20190626-windows.zip"
|
|
SHA512 c0848eddb1579b3bb0496b8785e24f30470f3c477145035fd729264a326a467b9467ae9f426aa5d72d168ad9e9bf2c279150744832736bdf39064d24b04de1a3
|
|
FILENAME webrtc-20190626-windows.zip
|
|
)
|
|
elseif (APPLE)
|
|
vcpkg_download_distfile(
|
|
WEBRTC_SOURCE_ARCHIVE
|
|
URLS "${EXTERNAL_BUILD_ASSETS}/seth/webrtc-m78-osx.tar.gz"
|
|
SHA512 8b547da921cc96f5c22b4253a1c9e707971bb627898fbdb6b238ef1318c7d2512e878344885c936d4bd6a66005cc5b63dfc3fa5ddd14f17f378dcaa17b5e25df
|
|
FILENAME webrtc-m78-osx.tar.gz
|
|
)
|
|
else ()
|
|
# else Linux desktop
|
|
vcpkg_download_distfile(
|
|
WEBRTC_SOURCE_ARCHIVE
|
|
URLS "${EXTERNAL_BUILD_ASSETS}/seth/webrtc-20190626-linux.tar.gz"
|
|
SHA512 07d7776551aa78cb09a3ef088a8dee7762735c168c243053b262083d90a1d258cec66dc386f6903da5c4461921a3c2db157a1ee106a2b47e7756cb424b66cc43
|
|
FILENAME webrtc-20190626-linux.tar.gz
|
|
)
|
|
endif ()
|
|
|
|
vcpkg_extract_source_archive(${WEBRTC_SOURCE_ARCHIVE})
|
|
|
|
file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
|
file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
|
file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/share DESTINATION ${CURRENT_PACKAGES_DIR})
|
|
file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/debug DESTINATION ${CURRENT_PACKAGES_DIR})
|