aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-02-21 16:45:24 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-02-21 17:45:57 -0800
commit099759de63e2d64ffe80f6c9244a2390e47316bc (patch)
tree048fa2f763ab2ef06ba1c884f4fd3a4823e08747 /scripts
parent6b48216b8c6112833311bc9aabde4664a036ecd9 (diff)
downloadvcpkg-099759de63e2d64ffe80f6c9244a2390e47316bc.tar.gz
vcpkg-099759de63e2d64ffe80f6c9244a2390e47316bc.zip
[vcpkg-download-distfile] Create target directory on download
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index 28276f47c..af4926008 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -111,6 +111,8 @@ function(vcpkg_download_distfile VAR)
message(STATUS "Downloading ${url}... Failed. Status: ${download_status}")
set(download_success 0)
else()
+ get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY)
+ file(MAKE_DIRECTORY "${downloaded_file_dir}")
file(RENAME ${download_file_path_part} ${downloaded_file_path})
message(STATUS "Downloading ${url}... OK")
set(download_success 1)