Prefer upgrading zlib before other vcpkg deps.

Just a hack to fix a problem with vcpkg upgrades, in this case the
version of the zlib port being too old breaks another upgrade, so we
will check if zlib is in the list of packages to upgrade and upgrade it
before anything else.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-07-30 22:40:42 +00:00
parent 299362b3cf
commit 9495dc84f8
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 6 additions and 2 deletions

View File

@ -34,11 +34,15 @@ function(vcpkg_get_first_upgrade vcpkg_exe)
)
if(NOT pkg_upgrade MATCHES up-to-date)
set(first_upgrade ${pkg} PARENT_SCOPE)
return()
# Prefer upgrading zlib before anything else.
if(NOT first_upgrade OR pkg MATCHES zlib)
set(first_upgrade ${pkg})
endif()
endif()
endif()
endforeach()
set(first_upgrade ${first_upgrade} PARENT_SCOPE)
endfunction()
function(vcpkg_set_toolchain)