aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-09-20 21:09:00 -0700
committerRobert Schumacher <roschuma@microsoft.com>2016-09-20 21:09:00 -0700
commite04ecb3dd85213679d668fec517a113faf973050 (patch)
treed5ee5ca09594936df084f68e782ecd80c5780de0 /scripts
parenteb4d6f311cf7a46965ad0ee9cd86a0544020de44 (diff)
downloadvcpkg-e04ecb3dd85213679d668fec517a113faf973050.tar.gz
vcpkg-e04ecb3dd85213679d668fec517a113faf973050.zip
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_extract_source_archive.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/cmake/vcpkg_extract_source_archive.cmake b/scripts/cmake/vcpkg_extract_source_archive.cmake
index d970bb8b2..7e4efde07 100644
--- a/scripts/cmake/vcpkg_extract_source_archive.cmake
+++ b/scripts/cmake/vcpkg_extract_source_archive.cmake
@@ -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()