mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:09:00 +08:00
[ports.cmake] Use vcpkg_download_distfile()
This commit is contained in:
parent
a523aacff8
commit
0fb0191f3c
@ -108,10 +108,12 @@ elseif(CMD MATCHES "^CREATE$")
|
||||
message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}")
|
||||
else()
|
||||
include(vcpkg_download_distfile)
|
||||
file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code)
|
||||
if(NOT error_code MATCHES "0;")
|
||||
message(FATAL_ERROR "Error downloading file: ${error_code}")
|
||||
endif()
|
||||
set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE")
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS ${URL}
|
||||
FILENAME ${FILENAME}
|
||||
)
|
||||
set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE")
|
||||
endif()
|
||||
file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user