diff options
| author | martin-s <webmaster@macside.net> | 2017-09-02 16:48:29 +0200 |
|---|---|---|
| committer | martin-s <webmaster@macside.net> | 2017-09-02 16:48:29 +0200 |
| commit | c167c70c272a417779e601fffcbdb72278da1848 (patch) | |
| tree | 2ec6baf82c7194e97f6960bccde5b79cf1ed3edf /scripts | |
| parent | 35a9d223bc14fb4b35d6ad876d208897c8ce590a (diff) | |
| download | vcpkg-c167c70c272a417779e601fffcbdb72278da1848.tar.gz vcpkg-c167c70c272a417779e601fffcbdb72278da1848.zip | |
- Added support for VS2013 build chain tools.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_configure_cmake.cmake | 8 | ||||
| -rw-r--r-- | scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 39 |
2 files changed, 42 insertions, 5 deletions
diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 07acfc8ea..e43075961 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -61,6 +61,14 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") + + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(GENERATOR "Visual Studio 12 2013") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(GENERATOR "Visual Studio 12 2013 Win64") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(GENERATOR "Visual Studio 12 2013 ARM") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index f72491e5d..82d9f7c16 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -4,12 +4,15 @@ param( [switch]$DisableVS2017 = $False, [Parameter(Mandatory=$False)] - [switch]$DisableVS2015 = $False + [switch]$DisableVS2015 = $False, + + [Parameter(Mandatory=$False)] + [switch]$DisableVS2013 = $False ) -if ($DisableVS2017 -and $DisableVS2015) +if ($DisableVS2017 -and $DisableVS2015 -and $DisableVS2013) { - throw "Both VS2015 and VS2017 were disabled." + throw "VS013, VS2015 and VS2017 were disabled." } function New-MSBuildInstance() @@ -23,7 +26,7 @@ function New-MSBuildInstance() return $instance } -Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015" +Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015, DisableVS2013=$DisableVS2013" $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $validInstances = New-Object System.Collections.ArrayList @@ -139,6 +142,27 @@ foreach ($pair in $registryPairs) $validInstances.Add($instance) > $null } +# VS2013 - in Program Files +Write-Verbose "`n`n" +Write-Verbose "Checking for MSBuild from VS2013 in Program Files..." +$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) +Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $clExe= "$ProgramFiles\Microsoft Visual Studio 12.0\VC\bin\cl.exe" + + if (!(Test-Path $clExe)) + { + Write-Verbose "$clExe - Not Found" + continue + } + + Write-Verbose "$clExe - Found" + $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\12.0\Bin\MSBuild.exe" "v120" + Write-Verbose "Found $instance" + $validInstances.Add($instance) > $null +} + Write-Verbose "`n`n`n" Write-Verbose "The following MSBuild instances were found:" foreach ($instance in $validInstances) @@ -158,7 +182,12 @@ foreach ($instance in $validInstances) { return $instance.msbuildExePath, $instance.toolsetVersion } + + if (!$DisableVS2013 -and $instance.toolsetVersion -eq "v120") + { + return $instance.msbuildExePath, $instance.toolsetVersion + } } -throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed."
\ No newline at end of file +throw "Could not find MSBuild version with C++ support. VS2013, VS2015 or VS2017 (with C++) needs to be installed."
\ No newline at end of file |
