diff options
Diffstat (limited to 'scripts/cmake/vcpkg_from_github.cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_from_github.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 545be3b4d..c6a23cff6 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -137,7 +137,6 @@ function(vcpkg_from_github) endif() # Try to download the file and version information from github. - set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") vcpkg_download_distfile(ARCHIVE_VERSION URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" FILENAME ${downloaded_file_name}.version @@ -149,7 +148,6 @@ function(vcpkg_from_github) FILENAME ${downloaded_file_name} SKIP_SHA512 ) - set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( @@ -164,7 +162,10 @@ function(vcpkg_from_github) string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. - set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + # When multiple vcpkg_from_github's are used after each other, only use the version from the first (hopefully the primary one). + if(NOT DEFINED VCPKG_HEAD_VERSION) + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + endif() set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) endfunction() |
