From 0eb65a0eb34ebc3d1cb1b9520fb6281b5e8bd196 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Tue, 7 Nov 2023 18:32:02 +0000 Subject: [PATCH] build: fix finding vcpkg binary packages on server Fix the regex against the file listing module on the server for the vcpkg binary package list. Also replace all the dashes in versions with periods for comparison purposes. Signed-off-by: Rafael Kitover --- cmake/Set-Toolchain-vcpkg.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index b8a898a9..efa697dc 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -136,6 +136,7 @@ function(vcpkg_is_installed vcpkg_exe pkg_name pkg_version outvar) set(${outvar} FALSE PARENT_SCOPE) string(REGEX REPLACE "-r([0-9]+)\$" ".\\1" pkg_version ${pkg_version}) + string(REPLACE "-" "." pkg_version ${pkg_version}) if(NOT DEFINED VCPKG_INSTALLED) execute_process( @@ -154,6 +155,7 @@ function(vcpkg_is_installed vcpkg_exe pkg_name pkg_version outvar) set(inst_pkg_version ${CMAKE_MATCH_2}) string(REGEX REPLACE "#([0-9]+)\$" ".\\1" inst_pkg_version ${inst_pkg_version}) + string(REPLACE "-" "." inst_pkg_version ${inst_pkg_version}) list(APPEND VCPKG_INSTALLED ${inst_pkg_name} ${inst_pkg_version}) math(EXPR VCPKG_INSTALLED_COUNT "${VCPKG_INSTALLED_COUNT} + 1") @@ -203,7 +205,7 @@ function(get_binary_packages vcpkg_exe) unset(binary_packages) unset(to_install) foreach(pkg ${binary_packages_html}) - if(NOT pkg MATCHES "^.*]+>([^_]+)_([^_]+)_([^<]+[.]zip)<.*\$") + if(NOT pkg MATCHES "