build: fix re-downloading vcpkg binary packages
Fix re-installing binary packages on next cached run by clearing the cache entries for `vcpkg list`. Also remove the binary packages directory after installing. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
bbaf70c083
commit
1f3a1cb9dc
|
@ -267,6 +267,13 @@ function(zip_is_installed vcpkg_exe zip outvar)
|
|||
set(${outvar} ${pkg_installed} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(cleanup_binary_packages)
|
||||
file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/vcpkg-binary-packages")
|
||||
|
||||
unset(VCPKG_INSTALLED CACHE)
|
||||
unset(VCPKG_INSTALLED_COUNT CACHE)
|
||||
endfunction()
|
||||
|
||||
function(get_binary_packages vcpkg_exe)
|
||||
set(binary_packages_installed FALSE PARENT_SCOPE)
|
||||
|
||||
|
@ -396,6 +403,8 @@ function(get_binary_packages vcpkg_exe)
|
|||
file(REMOVE_RECURSE ${bin_pkgs_dir})
|
||||
endif()
|
||||
|
||||
cleanup_binary_packages()
|
||||
|
||||
set(binary_packages_installed TRUE PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
|
Loading…
Reference in New Issue