aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index 1b06d7b5b..c859c98a0 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -80,12 +80,14 @@ function(vcpkg_download_distfile VAR)
message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.")
endif()
endif()
- if(vcpkg_download_distfile_SHA512 STREQUAL "0")
- string(REPEAT "0" 128 vcpkg_download_distfile_SHA512)
- endif()
- string(LENGTH "${vcpkg_download_distfile_SHA512}" vcpkg_download_distfile_SHA512_length)
- if(NOT vcpkg_download_distfile_SHA512_length EQUAL "128")
- message(FATAL_ERROR "Invalid SHA512: ${vcpkg_download_distfile_SHA512}. If you do not know the file's SHA512, set this to \"0\".")
+ if(NOT vcpkg_download_distfile_SKIP_SHA512)
+ if(vcpkg_download_distfile_SHA512 STREQUAL "0")
+ string(REPEAT "0" 128 vcpkg_download_distfile_SHA512)
+ endif()
+ string(LENGTH "${vcpkg_download_distfile_SHA512}" vcpkg_download_distfile_SHA512_length)
+ if(NOT vcpkg_download_distfile_SHA512_length EQUAL "128")
+ message(FATAL_ERROR "Invalid SHA512: ${vcpkg_download_distfile_SHA512}. If you do not know the file's SHA512, set this to \"0\".")
+ endif()
endif()
set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})