aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmake/vcpkg_from_github.cmake
diff options
context:
space:
mode:
authorBarath Kannan <barathsotd@gmail.com>2018-01-17 19:00:43 +1100
committerBarath Kannan <barathsotd@gmail.com>2018-01-17 19:00:43 +1100
commitc30363d07b3f64b5f38531442ea92d9c1cf81d13 (patch)
tree8a169a2a0aadf40dad50e73d226c3eca1e949327 /scripts/cmake/vcpkg_from_github.cmake
parent47189e90d59459be69d4f6a0b039849913031c8e (diff)
parent28c5c6ae4601c323cbd57a13da03b9047dc282ad (diff)
downloadvcpkg-c30363d07b3f64b5f38531442ea92d9c1cf81d13.tar.gz
vcpkg-c30363d07b3f64b5f38531442ea92d9c1cf81d13.zip
Merge branch 'master' into qt5_modular
Diffstat (limited to 'scripts/cmake/vcpkg_from_github.cmake')
-rw-r--r--scripts/cmake/vcpkg_from_github.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake
index b71ab3838..c6a23cff6 100644
--- a/scripts/cmake/vcpkg_from_github.cmake
+++ b/scripts/cmake/vcpkg_from_github.cmake
@@ -137,17 +137,17 @@ 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
+ SKIP_SHA512
)
vcpkg_download_distfile(ARCHIVE
URLS ${URL}
FILENAME ${downloaded_file_name}
+ SKIP_SHA512
)
- set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE")
endif()
vcpkg_extract_source_archive_ex(
@@ -162,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()