mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:37:20 +08:00
[vcpkg_find_acquire_program] Fix extraction, cleanup (#40916)
This commit is contained in:
parent
64578ff08c
commit
d0d081b3fc
@ -199,6 +199,15 @@ function(vcpkg_find_acquire_program program)
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
endif()
|
||||
elseif(tool_subdirectory STREQUAL "")
|
||||
# The effective tool subdir is owned by the extracted paths of the archive.
|
||||
# *** This behavior is provided for convenience and short paths. ***
|
||||
# There must be no overlap between different providers of subdirs.
|
||||
# Otherwise tool_subdirectory must be used in order to separate extracted trees.
|
||||
file(REMOVE_RECURSE "${full_subdirectory}.temp")
|
||||
vcpkg_extract_archive(ARCHIVE "${archive_path}" DESTINATION "${full_subdirectory}.temp")
|
||||
file(COPY "${full_subdirectory}.temp/" DESTINATION "${full_subdirectory}")
|
||||
file(REMOVE_RECURSE "${full_subdirectory}.temp")
|
||||
else()
|
||||
vcpkg_extract_archive(ARCHIVE "${archive_path}" DESTINATION "${full_subdirectory}")
|
||||
endif()
|
||||
|
@ -27,6 +27,11 @@ if(VCPKG_HOST_IS_LINUX)
|
||||
endif()
|
||||
|
||||
if(VCPKG_HOST_IS_WINDOWS)
|
||||
# The version-agnostic tool dir may already exist.
|
||||
# Simulate/test with NASM.
|
||||
file(REMOVE_RECURSE "${DOWNLOADS}/tools/nasm")
|
||||
file(MAKE_DIRECTORY "${DOWNLOADS}/tools/nasm")
|
||||
|
||||
list(APPEND variables 7Z ARIA2 CLANG DARK DOXYGEN GASPREPROCESSOR GO GPERF JOM NASM NUGET PYTHON2 RUBY SCONS SWIG)
|
||||
vcpkg_find_acquire_program(7Z)
|
||||
vcpkg_find_acquire_program(ARIA2)
|
||||
|
Loading…
Reference in New Issue
Block a user