aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-03-22 03:08:25 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-03-22 06:52:55 -0700
commitc3fb0b169751ec0f25ac3752a7e83e21173073a4 (patch)
tree0d0535ba34e09dbdb4f92c5a05adf7eb8c6e8b06 /scripts
parent19b75faebd135d97a545dc57a51afef6d94cccc7 (diff)
downloadvcpkg-c3fb0b169751ec0f25ac3752a7e83e21173073a4.tar.gz
vcpkg-c3fb0b169751ec0f25ac3752a7e83e21173073a4.zip
[vcpkg] Download cmake on osx and linux
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fetchTool.ps18
-rw-r--r--scripts/vcpkgTools.xml6
2 files changed, 10 insertions, 4 deletions
diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1
index 2c2f599ef..86174ee19 100644
--- a/scripts/fetchTool.ps1
+++ b/scripts/fetchTool.ps1
@@ -35,14 +35,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
$isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath"
if ($isArchive)
{
- $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)"
+ $downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])"
}
else
{
- $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)"
+ $downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])"
}
- $url = $toolData.url
+ [String]$url = @($toolData.url)[0]
if (!(Test-Path $downloadPath))
{
Write-Host "Downloading $tool..."
@@ -50,7 +50,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool)
Write-Host "Downloading $tool has completed successfully."
}
- $expectedDownloadedFileHash = $toolData.sha256
+ $expectedDownloadedFileHash = @($toolData.sha256)[0]
$downloadedFileHash = vcpkgGetSHA256 $downloadPath
vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml
index 02fd0b996..9c78e92d9 100644
--- a/scripts/vcpkgTools.xml
+++ b/scripts/vcpkgTools.xml
@@ -6,6 +6,12 @@
<url>https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip</url>
<sha256>f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6</sha256>
<archiveRelativePath>cmake-3.10.2-win32-x86.zip</archiveRelativePath>
+ <exeRelativePath os="osx">cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath>
+ <url os="osx">https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz</url>
+ <archiveRelativePath os="osx">cmake-3.10.2-Darwin-x86_64.tar.gz</archiveRelativePath>
+ <exeRelativePath os="linux">cmake-3.10.2-Linux-x86_64/bin/cmake</exeRelativePath>
+ <url os="linux">https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz</url>
+ <archiveRelativePath os="linux">cmake-3.10.2-Linux-x86_64.tar.gz</archiveRelativePath>
</tool>
<tool name="git">
<requiredVersion>2.16.2</requiredVersion>