mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:48:59 +08:00
Add stamp file for extracted archives.
This enables multiple archives to be correctly expanded into the same build tree. Previously, the second archive will detect as being already extracted since 'src' exists.
This commit is contained in:
parent
eb4d6f311c
commit
e04ecb3dd8
@ -1,7 +1,8 @@
|
||||
include(vcpkg_execute_required_process)
|
||||
|
||||
function(vcpkg_extract_source_archive ARCHIVE)
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src)
|
||||
get_filename_component(ARCHIVE_FILENAME ${ARCHIVE} NAME)
|
||||
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_FILENAME}.extracted)
|
||||
message(STATUS "Extracting source ${ARCHIVE}")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src)
|
||||
vcpkg_execute_required_process(
|
||||
@ -9,6 +10,7 @@ function(vcpkg_extract_source_archive ARCHIVE)
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
||||
LOGNAME extract
|
||||
)
|
||||
file(WRITE ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_FILENAME}.extracted)
|
||||
endif()
|
||||
message(STATUS "Extracting done")
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user