aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cmake')
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index a394642a2..602790190 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -1,7 +1,7 @@
-# Usage: vcpkg_download_distfile(<VAR> URL <http://...> FILENAME <output.zip> SHA512 <5981de...> MIRRORS <http://mirror1> <http://mirror2>)
+# Usage: vcpkg_download_distfile(<VAR> URLS <http://mainUrl> <http://mirror1> <http://mirror2> FILENAME <output.zip> SHA512 <5981de...>)
function(vcpkg_download_distfile VAR)
- set(oneValueArgs URL FILENAME SHA512)
- set(multipleValuesArgs MIRRORS)
+ set(oneValueArgs FILENAME SHA512)
+ set(multipleValuesArgs URLS)
cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN})
set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
@@ -18,8 +18,7 @@ function(vcpkg_download_distfile VAR)
endif()
else()
# Tries to download the file.
- list(INSERT vcpkg_download_distfile_MIRRORS 0 ${vcpkg_download_distfile_URL})
- foreach(url IN LISTS vcpkg_download_distfile_MIRRORS)
+ foreach(url IN LISTS vcpkg_download_distfile_URLS)
message(STATUS "Downloading ${url}...")
file(DOWNLOAD ${url} ${downloaded_file_path} STATUS download_status)
list(GET download_status 0 status_code)