From e8d1666d9c88ff1ccce3b388ea09f500735f17b7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Mar 2018 13:08:06 -0700 Subject: [aws-sdk-cpp] Update and fix cmake files --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 7f1f827c2..475047737 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -81,7 +81,7 @@ function(vcpkg_fixup_cmake_targets) endif() endif() - file(GLOB UNUSED_FILES + file(GLOB_RECURSE UNUSED_FILES "${DEBUG_SHARE}/*[Tt]argets.cmake" "${DEBUG_SHARE}/*[Cc]onfig.cmake" "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake" @@ -91,10 +91,10 @@ function(vcpkg_fixup_cmake_targets) file(REMOVE ${UNUSED_FILES}) endif() - file(GLOB RELEASE_TARGETS + file(GLOB_RECURSE RELEASE_TARGETS "${RELEASE_SHARE}/*-release.cmake" ) - foreach(RELEASE_TARGET ${RELEASE_TARGETS}) + foreach(RELEASE_TARGET IN LISTS RELEASE_TARGETS) file(READ ${RELEASE_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") @@ -102,25 +102,25 @@ function(vcpkg_fixup_cmake_targets) endforeach() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB DEBUG_TARGETS + file(GLOB_RECURSE DEBUG_TARGETS "${DEBUG_SHARE}/*-debug.cmake" ) - foreach(DEBUG_TARGET ${DEBUG_TARGETS}) - get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) + foreach(DEBUG_TARGET IN LISTS DEBUG_TARGETS) + file(RELATIVE_PATH DEBUG_TARGET_REL "${DEBUG_SHARE}" "${DEBUG_TARGET}") file(READ ${DEBUG_TARGET} _contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}/${DEBUG_TARGET_NAME} "${_contents}") + file(WRITE ${RELEASE_SHARE}/${DEBUG_TARGET_REL} "${_contents}") file(REMOVE ${DEBUG_TARGET}) endforeach() endif() - file(GLOB MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") - foreach(MAIN_TARGET ${MAIN_TARGETS}) + file(GLOB_RECURSE MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") + foreach(MAIN_TARGET IN LISTS MAIN_TARGETS) file(READ ${MAIN_TARGET} _contents) string(REGEX REPLACE "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" @@ -133,8 +133,8 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() - file(GLOB MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") - foreach(MAIN_CONFIG ${MAIN_CONFIGS}) + file(GLOB_RECURSE MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") + foreach(MAIN_CONFIG IN LISTS MAIN_CONFIGS) file(READ ${MAIN_CONFIG} _contents) string(REGEX REPLACE "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" -- cgit v1.2.3 From 72758773321476dcbb7b9d18f11bf57134bb4545 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 03:04:05 -0700 Subject: [ps1] Fixes/tweaks --- scripts/VcpkgPowershellUtils.ps1 | 13 ++++++------- scripts/fetchTool.ps1 | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index d9c9e3760..bc84afa7f 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -110,9 +110,9 @@ function vcpkgGetSHA256([Parameter(Mandatory=$true)][string]$filePath) function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$filePath, [Parameter(Mandatory=$true)][string]$expectedHash, - [Parameter(Mandatory=$true)][string]$actualHash ) + [Parameter(Mandatory=$true)][string]$actualHash) { - if ($expectedDownloadedFileHash -ne $downloadedFileHash) + if ($expectedHash -ne $actualHash) { Write-Host ("`nFile does not have expected hash:`n" + " File path: [ $filePath ]`n" + @@ -150,7 +150,6 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, $downloadPartPath = "$downloadPath.part" vcpkgRemoveItem $downloadPartPath - $wc = New-Object System.Net.WebClient if (!$wc.Proxy.IsBypassed($url)) { @@ -161,7 +160,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, Move-Item -Path $downloadPartPath -Destination $downloadPath } -function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, +function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$archivePath, [Parameter(Mandatory=$true)][string]$destinationDir, [Parameter(Mandatory=$true)][string]$outFilename) { @@ -176,18 +175,18 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destinationPartial + Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial } elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') { Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $file -OutputPath $destinationPartial + Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial } else { Write-Verbose("Extracting via shell") $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $file).fullname) + $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) foreach($item in $zip.items()) { # Piping to Out-Null is used to block until finished diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index ff9b5d9bf..a52986553 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -47,7 +47,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { Write-Host "Downloading $tool..." vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $tool has completed successfully." + Write-Host "Downloading $tool... done." } $expectedDownloadedFileHash = @($toolData.sha256)[0] -- cgit v1.2.3 From 72194ae8a0e435aee63b8e40f585646247672e3b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 04:08:57 -0700 Subject: [ps1] More fixes/tweaks --- scripts/VcpkgPowershellUtils.ps1 | 7 +++++-- scripts/fetchTool.ps1 | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index bc84afa7f..92e0f21d0 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -194,11 +194,14 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$archivePath, } } - $itemCount = @(Get-ChildItem "$destinationPartial").Count + $items = @(Get-ChildItem "$destinationPartial") + $itemCount = $items.Count if ($itemCount -eq 1) { - Move-Item -Path "$destinationPartial\*" -Destination $output + $item = $items | Select-Object -first 1 + Write-Host "$item" + Move-Item -Path "$destinationPartial\$item" -Destination $output vcpkgRemoveItem $destinationPartial } else diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index a52986553..af6d4d1d9 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -58,13 +58,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { $outFilename = (Get-ChildItem $downloadPath).BaseName Write-Host "Extracting $tool..." - vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $tool has completed successfully." + vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool... done." } if (-not (Test-Path $exePath)) { - throw ("Could not detect or download " + $tool) + Write-Error "Could not detect or download $tool" + throw } return $exePath -- cgit v1.2.3 From cfd0d9c0e2e90227532f36343907f95908a1864d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Mar 2018 17:21:46 -0700 Subject: [vcpkg-find-acquire-program] Update version of YASM --- scripts/cmake/vcpkg_find_acquire_program.cmake | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 083b86fc2..64d0c7599 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -40,6 +40,7 @@ function(vcpkg_find_acquire_program VAR) endif() unset(NOEXTRACT) + unset(_vfa_RENAME) unset(SUBDIR) unset(REQUIRED_INTERPRETER) @@ -67,11 +68,13 @@ function(vcpkg_find_acquire_program VAR) set(HASH df7aaba094e17832688c88993997612a2e2c96cc3dc14ca3e8347b44c7762115f5a7fc6d7f20be402553aaa4c9e43ddfcf6228f581cfe89289bae550de151b36) elseif(VAR MATCHES "YASM") set(PROGNAME yasm) - set(PATHS ${DOWNLOADS}/tools/yasm) - set(URL "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe") - set(ARCHIVE "yasm.exe") + set(SUBDIR 1.3.0.6) + set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR}) + set(URL "https://www.tortall.net/projects/yasm/snapshots/v1.3.0.6.g1962/yasm-1.3.0.6.g1962.exe") + set(ARCHIVE "yasm-1.3.0.6.g1962.exe") + set(_vfa_RENAME "yasm.exe") set(NOEXTRACT ON) - set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) + set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b) elseif(VAR MATCHES "PYTHON3") set(PROGNAME python) set(SUBDIR "python3") @@ -205,7 +208,11 @@ function(vcpkg_find_acquire_program VAR) file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) if(DEFINED NOEXTRACT) - file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + if(DEFINED _vfa_RENAME) + file(INSTALL ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} RENAME ${_vfa_RENAME}) + else() + file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + endif() else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) -- cgit v1.2.3 From 45d31162c25e168c46d9dd0f3f00e49edf625f21 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 17:48:33 -0700 Subject: [ps1] Remove extraneous function --- scripts/fetchTool.ps1 | 93 ++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 50 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index af6d4d1d9..8cf8002bc 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -13,64 +13,57 @@ $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" vcpkgCreateDirectoryIfNotExists $downloadsDir -function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) -{ - $tool = $tool.toLower() - - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! +$tool = $tool.toLower() - if ($toolData -eq $null) - { - throw "Unkown tool $tool" - } +[xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" +$toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! - $exePath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" +if ($toolData -eq $null) +{ + throw "Unkown tool $tool" +} - if (Test-Path $exePath) - { - return $exePath - } +$exePath = "$downloadsDir\$($toolData.exeRelativePath)" - $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" - if ($isArchive) - { - $downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])" - } - else - { - $downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" - } +if (Test-Path $exePath) +{ + return $exePath +} - [String]$url = @($toolData.url)[0] - if (!(Test-Path $downloadPath)) - { - Write-Host "Downloading $tool..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $tool... done." - } +$isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" +if ($isArchive) +{ + $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" +} +else +{ + $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" +} - $expectedDownloadedFileHash = @($toolData.sha256)[0] - $downloadedFileHash = vcpkgGetSHA256 $downloadPath - vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash +[String]$url = $toolData.url +if (!(Test-Path $downloadPath)) +{ + Write-Host "Downloading $tool..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $tool... done." +} - if ($isArchive) - { - $outFilename = (Get-ChildItem $downloadPath).BaseName - Write-Host "Extracting $tool..." - vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $tool... done." - } +$expectedDownloadedFileHash = $toolData.sha256 +$downloadedFileHash = vcpkgGetSHA256 $downloadPath +vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash - if (-not (Test-Path $exePath)) - { - Write-Error "Could not detect or download $tool" - throw - } +if ($isArchive) +{ + $outFilename = (Get-ChildItem $downloadPath).BaseName + Write-Host "Extracting $tool..." + vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool... done." +} - return $exePath +if (-not (Test-Path $exePath)) +{ + Write-Error "Could not detect or download $tool" + throw } -$path = fetchToolInternal $tool -Write-Verbose "Fetching tool: $tool. Done." -return "::$path::" +return "::$exePath::" -- cgit v1.2.3 From c814c9b8ac883aa42930e1f48660145fd4234fe6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 13:23:30 -0700 Subject: [vcpkgTools.xml] Restructre os-specific info --- scripts/vcpkgTools.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 9c78e92d9..5df2de7ad 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -6,12 +6,20 @@ https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 cmake-3.10.2-win32-x86.zip - cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake - https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz - cmake-3.10.2-Darwin-x86_64.tar.gz - cmake-3.10.2-Linux-x86_64/bin/cmake - https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz - cmake-3.10.2-Linux-x86_64.tar.gz + + + 3.10.2 + cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake + https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz + e748eb7698f8e2783c2eea9ab81eebf66da0238bbf8e8fa722a67a38f2110718 + cmake-3.10.2-Darwin-x86_64.tar.gz + + + 3.10.2 + cmake-3.10.2-Linux-x86_64/bin/cmake + https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz + 7a82b46c35f4e68a0807e8dc04e779dee3f36cd42c6387fd13b5c29fe62a69ea + cmake-3.10.2-Linux-x86_64.tar.gz 2.16.2 -- cgit v1.2.3 From 12d862ab2b6e387b596e680d334daa212b77fb32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 18:06:02 -0700 Subject: [ps1] Revert function removal --- scripts/fetchTool.ps1 | 93 +++++++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 43 deletions(-) (limited to 'scripts') diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 8cf8002bc..26eedac3b 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -13,57 +13,64 @@ $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" vcpkgCreateDirectoryIfNotExists $downloadsDir -$tool = $tool.toLower() +function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) +{ + $tool = $tool.toLower() -[xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" -$toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! + [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" + $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! -if ($toolData -eq $null) -{ - throw "Unkown tool $tool" -} + if ($toolData -eq $null) + { + throw "Unkown tool $tool" + } -$exePath = "$downloadsDir\$($toolData.exeRelativePath)" + $exePath = "$downloadsDir\$($toolData.exeRelativePath)" -if (Test-Path $exePath) -{ - return $exePath -} + if (Test-Path $exePath) + { + return $exePath + } -$isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" -if ($isArchive) -{ - $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" -} -else -{ - $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" -} + $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" + if ($isArchive) + { + $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + } + else + { + $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + } -[String]$url = $toolData.url -if (!(Test-Path $downloadPath)) -{ - Write-Host "Downloading $tool..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $tool... done." -} + [String]$url = $toolData.url + if (!(Test-Path $downloadPath)) + { + Write-Host "Downloading $tool..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $tool... done." + } -$expectedDownloadedFileHash = $toolData.sha256 -$downloadedFileHash = vcpkgGetSHA256 $downloadPath -vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash + $expectedDownloadedFileHash = $toolData.sha256 + $downloadedFileHash = vcpkgGetSHA256 $downloadPath + vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash -if ($isArchive) -{ - $outFilename = (Get-ChildItem $downloadPath).BaseName - Write-Host "Extracting $tool..." - vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $tool... done." -} + if ($isArchive) + { + $outFilename = (Get-ChildItem $downloadPath).BaseName + Write-Host "Extracting $tool..." + vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool... done." + } -if (-not (Test-Path $exePath)) -{ - Write-Error "Could not detect or download $tool" - throw + if (-not (Test-Path $exePath)) + { + Write-Error "Could not detect or download $tool" + throw + } + + return $exePath } -return "::$exePath::" +$path = fetchToolInternal $tool +Write-Verbose "Fetching tool: $tool. Done." +return "::$path::" -- cgit v1.2.3 From 3e1104465eb4e40e3b4dce1a212d90a68928d442 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Mar 2018 18:35:27 -0700 Subject: Add ninja to vcpkgTools.xml --- scripts/vcpkgTools.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scripts') diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 5df2de7ad..477584c5a 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -54,4 +54,18 @@ 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac 7za920.zip + + 1.8.2 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip + d2fea9ff33b3ef353161ed906f260d565ca55b8ca0568fa07b1d2cab90a84a07 + ninja-linux.zip + + + 1.8.2 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip + 0347d55c66061652b26f48769d566761630ffde3143793b29064a57f356542cc + ninja-mac.zip + -- cgit v1.2.3 From f9d4692749ad68340a07453add49a8ef029fa155 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 29 Mar 2018 21:14:06 -0700 Subject: [vcpkg.cmake] Remove Windows SDK detection. Let cmake detect it --- scripts/buildsystems/vcpkg.cmake | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 10e3c3f13..0c32b22fb 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -44,7 +44,7 @@ else() elseif(_VCPKG_CL MATCHES "arm/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(_VCPKG_CL MATCHES "arm64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm64) + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") @@ -110,16 +110,6 @@ list(APPEND CMAKE_LIBRARY_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ) -if (NOT DEFINED CMAKE_SYSTEM_VERSION AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") - include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) - # This is used as an implicit parameter for vcpkg_get_windows_sdk - set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) - vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) - unset(VCPKG_ROOT_DIR) - set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version") - message(STATUS "Found Windows SDK ${WINDOWS_SDK_VERSION}") -endif() - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) set(CMAKE_SYSTEM_IGNORE_PATH "${_programfiles}/OpenSSL" -- cgit v1.2.3