diff options
| author | myd7349 <myd7349@gmail.com> | 2019-06-14 07:55:33 +0800 |
|---|---|---|
| committer | myd7349 <myd7349@gmail.com> | 2019-06-14 07:55:33 +0800 |
| commit | 1e9b8dd1b420aac64cbdd8bb905c02fa3c651b17 (patch) | |
| tree | 284efa9cf01657928d184e194a39e7cdee682e04 /scripts | |
| parent | 7cd35529736837e2e74dad231717bda76327ac79 (diff) | |
| parent | b03f62e0ebc1b5515bc8a1f41f3bfe9eca6589d4 (diff) | |
| download | vcpkg-1e9b8dd1b420aac64cbdd8bb905c02fa3c651b17.tar.gz vcpkg-1e9b8dd1b420aac64cbdd8bb905c02fa3c651b17.zip | |
Merge branch 'master' into rdkafka-init
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/msbuild/applocal.ps1 | 4 | ||||
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 2 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_acquire_msys.cmake | 8 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_build_cmake.cmake | 133 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_common_functions.cmake | 1 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_configure_meson.cmake | 2 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_execute_build_process.cmake | 140 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 10 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_from_github.cmake | 2 |
9 files changed, 173 insertions, 129 deletions
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index cf363f12e..2fdd9fdb4 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -9,7 +9,7 @@ $g_is_debug = $g_install_root -match '(.*\\)?debug(\\)?$' # Ensure we create the copied files log, even if we don't end up copying any files if ($copiedFilesLog) { - Set-Content -Path $copiedFilesLog -Value "" -Encoding Ascii + Set-Content -Path $copiedFilesLog -Value "" -Encoding UTF8 } # Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7 @@ -28,7 +28,7 @@ function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$tar Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName" Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir } - if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" } + if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 } if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" } } diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 97fe1b81f..f657e2710 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -171,7 +171,7 @@ function(add_executable name) list(FIND ARGV "ALIAS" ALIAS_IDX) list(FIND ARGV "MACOSX_BUNDLE" MACOSX_BUNDLE_IDX) if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - if(VCPKG_APPLOCAL_DEPS) + if(VCPKG_APPLOCAL_DEPS) if(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") add_custom_command(TARGET ${name} POST_BUILD COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index adbd58ca5..09090db68 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -113,5 +113,13 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) message(STATUS "Acquiring MSYS Packages... OK") endif() + # Deal with a stale process created by MSYS + if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_execute_required_process( + COMMAND TASKKILL /F /IM gpg-agent.exe /fi "memusage gt 2" + WORKING_DIRECTORY ${SOURCE_PATH} + ) + endif() + set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 3db6597b4..b110d2cc9 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -60,10 +60,6 @@ function(vcpkg_build_cmake) set(TARGET_PARAM) endif() - if(_bc_DISABLE_PARALLEL) - set(PARALLEL_ARG ${NO_PARALLEL_ARG}) - endif() - foreach(BUILDTYPE "debug" "release") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) if(BUILDTYPE STREQUAL "debug") @@ -75,8 +71,6 @@ function(vcpkg_build_cmake) endif() message(STATUS "Building ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") - set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") - set(LOGS) if(_bc_ADD_BIN_TO_PATH) set(_BACKUP_ENV_PATH "$ENV{PATH}") @@ -91,121 +85,22 @@ function(vcpkg_build_cmake) set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin${_PATHSEP}$ENV{PATH}") endif() endif() - execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} - OUTPUT_FILE "${LOGPREFIX}-out.log" - ERROR_FILE "${LOGPREFIX}-err.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - if(error_code) - file(READ "${LOGPREFIX}-out.log" out_contents) - file(READ "${LOGPREFIX}-err.log" err_contents) - - if(out_contents) - list(APPEND LOGS "${LOGPREFIX}-out.log") - endif() - if(err_contents) - list(APPEND LOGS "${LOGPREFIX}-err.log") - endif() - - if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: ") - # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. - message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} without parallelism because memory exceeded") - execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} - OUTPUT_FILE "${LOGPREFIX}-out-1.log" - ERROR_FILE "${LOGPREFIX}-err-1.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - - if(error_code) - file(READ "${LOGPREFIX}-out-1.log" out_contents) - file(READ "${LOGPREFIX}-err-1.log" err_contents) - - if(out_contents) - list(APPEND LOGS "${LOGPREFIX}-out-1.log") - endif() - if(err_contents) - list(APPEND LOGS "${LOGPREFIX}-err-1.log") - endif() - endif() - elseif(out_contents MATCHES ": No such file or directory") - # WSL workaround - WSL occassionally fails with no such file or directory. Detect if we are running in WSL and restart. - execute_process(COMMAND "uname" "-r" - OUTPUT_VARIABLE UNAME_R ERROR_VARIABLE UNAME_R - OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) - - if (UNAME_R MATCHES "Microsoft") - set(ITERATION 0) - while (ITERATION LESS 10 AND out_contents MATCHES ": No such file or directory") - MATH(EXPR ITERATION "${ITERATION}+1") - message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of wsl subsystem issue. Iteration: ${ITERATION}") - execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} - OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" - ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - if(error_code) - file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) - file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) - - if(out_contents) - list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") - endif() - if(err_contents) - list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") - endif() - else() - break() - endif() - endwhile() - endif() - elseif(out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ") - # Antivirus workaround - occasionally files are locked and cause mt.exe to fail - set(ITERATION 0) - while (ITERATION LESS 3 AND (out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ")) - MATH(EXPR ITERATION "${ITERATION}+1") - message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${ITERATION}") - execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} - OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" - ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - - if(error_code) - file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) - file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) - - if(out_contents) - list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") - endif() - if(err_contents) - list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") - endif() - else() - break() - endif() - endwhile() - endif() - - if(error_code) - set(STRINGIFIED_LOGS) - foreach(LOG ${LOGS}) - file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) - list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") - endforeach() - set(_eb_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG}) - set(_eb_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - message(FATAL_ERROR - " Command failed: ${_eb_COMMAND}\n" - " Working Directory: ${_eb_WORKING_DIRECTORY}\n" - " See logs for more information:\n" - ${STRINGIFIED_LOGS}) - endif() + if (_bc_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + ) + else() + vcpkg_execute_build_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} + NO_PARALLEL_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + ) endif() + if(_bc_ADD_BIN_TO_PATH) set(ENV{PATH} "${_BACKUP_ENV_PATH}") endif() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index d66fc5eff..b99f8bee8 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -7,6 +7,7 @@ include(vcpkg_extract_source_archive) include(vcpkg_extract_source_archive_ex) include(vcpkg_execute_required_process) include(vcpkg_execute_required_process_repeat) +include(vcpkg_execute_build_process) include(vcpkg_find_acquire_program) include(vcpkg_fixup_cmake_targets) include(vcpkg_from_github) diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index 3c6903c9d..f1ae0e65f 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -26,7 +26,7 @@ function(vcpkg_configure_meson) set(MESON_RELEASE_LDFLAGS "${MESON_RELEASE_LDFLAGS} /INCREMENTAL:NO /OPT:REF /OPT:ICF") # select meson cmd-line options - list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja) + list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND _vcm_OPTIONS --default-library shared) else() diff --git a/scripts/cmake/vcpkg_execute_build_process.cmake b/scripts/cmake/vcpkg_execute_build_process.cmake new file mode 100644 index 000000000..27e8c8163 --- /dev/null +++ b/scripts/cmake/vcpkg_execute_build_process.cmake @@ -0,0 +1,140 @@ +## # vcpkg_execute_build_process +## +## Execute a required build process +## +## ## Usage +## ```cmake +## vcpkg_execute_build_process( +## COMMAND <cmd> [<args>...] +## [NO_PARALLEL_COMMAND <cmd> [<args>...]] +## WORKING_DIRECTORY </path/to/dir> +## LOGNAME <log_name>) +## ) +## ``` +## ## Parameters +## ### COMMAND +## The command to be executed, along with its arguments. +## +## ### NO_PARALLEL_COMMAND +## Optional parameter which specifies a non-parallel command to attempt if a +## failure potentially due to parallelism is detected. +## +## ### WORKING_DIRECTORY +## The directory to execute the command in. +## +## ### LOGNAME +## The prefix to use for the log files. +## +## This should be a unique name for different triplets so that the logs don't +## conflict when building multiple at once. +## +## ## Examples +## +## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +function(vcpkg_execute_build_process) + cmake_parse_arguments(_ebp "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND" ${ARGN}) + + set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out.log") + set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err.log") + + execute_process( + COMMAND ${_ebp_COMMAND} + WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + ) + + if(error_code) + file(READ ${LOG_OUT} out_contents) + file(READ ${LOG_ERR} err_contents) + + if(out_contents) + list(APPEND LOGS ${LOG_OUT}) + endif() + if(err_contents) + list(APPEND LOGS ${LOG_ERR}) + endif() + + if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: " + OR err_contents MATCHES "LINK : fatal error LNK1102:" OR err_contents MATCHES " fatal error C1060: " + OR out_contents MATCHES "LINK : fatal error LNK1318: Unexpected PDB error; ACCESS_DENIED" + OR out_contents MATCHES "LINK : fatal error LNK1104:") + # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. + message(STATUS "Restarting Build without parallelism because memory exceeded") + set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out-1.log") + set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err-1.log") + + if(_ebp_NO_PARALLEL_COMMAND) + execute_process( + COMMAND ${_ebp_NO_PARALLEL_COMMAND} + WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + ) + else() + execute_process( + COMMAND ${_ebp_COMMAND} + WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + ) + endif() + + if(error_code) + file(READ ${LOG_OUT} out_contents) + file(READ ${LOG_ERR} err_contents) + + if(out_contents) + list(APPEND LOGS ${LOG_OUT}) + endif() + if(err_contents) + list(APPEND LOGS ${LOG_ERR}) + endif() + endif() + elseif(out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ") + # Antivirus workaround - occasionally files are locked and cause mt.exe to fail + message(STATUS "mt.exe has failed. This may be the result of anti-virus. Disabling anti-virus on the buildtree folder may improve build speed") + set(ITERATION 0) + while (ITERATION LESS 3 AND (out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ")) + MATH(EXPR ITERATION "${ITERATION}+1") + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${ITERATION}") + execute_process( + COMMAND ${_ebp_COMMAND} + OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" + ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + + if(error_code) + file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) + file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") + endif() + else() + break() + endif() + endwhile() + endif() + + if(error_code) + set(STRINGIFIED_LOGS) + foreach(LOG ${LOGS}) + file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) + list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + endforeach() + message(FATAL_ERROR + " Command failed: ${_ebp_COMMAND}\n" + " Working Directory: ${_ebp_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + ${STRINGIFIED_LOGS}) + endif(error_code) + endif(error_code) +endfunction(vcpkg_execute_build_process) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index d5e95eb4b..4a77b4b8e 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -202,9 +202,9 @@ function(vcpkg_find_acquire_program VAR) set(REQUIRED_INTERPRETER PERL) set(SCRIPTNAME "gas-preprocessor.pl") set(PATHS ${DOWNLOADS}/tools/gas-preprocessor) - set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/36bacb4cba27003c572e5bf7a9c4dfe3c9a8d40d/gas-preprocessor.pl") + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/cbe88474ec196370161032a3863ec65050f70ba4/gas-preprocessor.pl") set(ARCHIVE "gas-preprocessor.pl") - set(HASH a25caadccd1457a0fd2abb5a0da9aca1713b2c351d76daf87a4141e52021f51aa09e95a62942c6f0764f79cc1fa65bf71584955b09e62ee7da067b5c82baf6b3) + set(HASH f6965875608bf2a3ee337e00c3f16e06cd9b5d10013da600d2a70887e47a7b4668af87b3524acf73dd122475712af831495a613a2128c1adb5fe0b4a11d96cd3) elseif(VAR MATCHES "DARK") set(PROGNAME dark) set(SUBDIR "wix311-binaries") @@ -223,9 +223,9 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "DOXYGEN") set(PROGNAME doxygen) set(PATHS ${DOWNLOADS}/tools/doxygen) - set(URL "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.14.windows.bin.zip") - set(ARCHIVE "doxygen-1.8.14.windows.bin.zip") - set(HASH d0d706501e7112045b1f401f22d12a2c8d9b7728edee9ad1975a17dff914c16494ae48a70beab6f6304643779935843f268c7afed3b9da7d403b5cb11cac0c50) + set(URL "http://doxygen.nl/files/doxygen-1.8.15.windows.bin.zip") + set(ARCHIVE "doxygen-1.8.15.windows.bin.zip") + set(HASH 89482dcb1863d381d47812c985593e736d703931d49994e09c7c03ef67e064115d0222b8de1563a7930404c9bc2d3be323f3d13a01ef18861be584db3d5a953c) # Download Tools elseif(VAR MATCHES "ARIA2") set(PROGNAME aria2c) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 48bfd828a..c0d657bbc 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -161,7 +161,7 @@ function(vcpkg_from_github) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${ARCHIVE_VERSION}" _contents) + file(READ "${downloaded_file_path}.version" _contents) string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) |
