Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial VS2017 build support with VS2015 toolset #50

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#requires -Version 3

param(
[ValidateSet("vs2012", "vs2013", "vs2015", "nupkg", "nupkg-only")]
[ValidateSet("vs2012", "vs2013", "vs2015", "vs2017", "nupkg", "nupkg-only")]
[Parameter(Position = 0)]
[string] $Target = "nupkg",

Expand Down Expand Up @@ -165,7 +165,7 @@ function Bootstrap
function Msvs
{
param(
[ValidateSet('v110', 'v120', 'v140')]
[ValidateSet('v110', 'v120', 'v140', 'v150')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain,

Expand Down Expand Up @@ -204,6 +204,14 @@ function Msvs
$VXXCommonTools = Join-Path $env:VS140COMNTOOLS '..\..\vc'
$CmakeGenerator = 'Visual Studio 14'
}
'v150' {
$PlatformTarget = '4.0'
$VisualStudioVersion = '14.0'
$VXXCommonTools = Join-Path $env:VS150COMNTOOLS '..\..\VC\Auxiliary\Build'
$CmakeGenerator = 'Visual Studio 14'
# use VS2015 toolchain with VS2017
$Toolchain = 'v140'
}
}

if ($VXXCommonTools -eq $null -or (-not (Test-Path($VXXCommonTools)))) {
Expand Down Expand Up @@ -282,7 +290,7 @@ function Msvs
function VSX
{
param(
[ValidateSet('v110', 'v120', 'v140')]
[ValidateSet('v110', 'v120', 'v140', 'v150')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain
)
Expand All @@ -302,6 +310,12 @@ function VSX
Return
}

if($Toolchain -eq 'v150' -and $env:VS150COMNTOOLS -eq $null) {
Warn "Toolchain $Toolchain is not installed on your development machine, skipping build."
Return
}


Write-Diagnostic "Starting to build targeting toolchain $Toolchain"

Msvs "$Toolchain" 'Debug' 'x86'
Expand All @@ -315,7 +329,7 @@ function VSX
function CreateCefSdk
{
param(
[ValidateSet('v110', 'v120', 'v140')]
[ValidateSet('v110', 'v120', 'v140', 'v150')]
[Parameter(Position = 0, ValueFromPipeline = $true)]
[string] $Toolchain,

Expand All @@ -331,7 +345,9 @@ function CreateCefSdk
Write-Diagnostic "Creating sdk for $Toolchain"

$VisualStudioVersion = $null
if($Toolchain -eq "v140") {
if($Toolchain -eq "v150") {
$VisualStudioVersion = "VS2015"
}if($Toolchain -eq "v140") {
$VisualStudioVersion = "VS2015"
} elseif($Toolchain -eq "v110") {
$VisualStudioVersion = "VS2012"
Expand Down Expand Up @@ -586,4 +602,7 @@ switch -Exact ($Target) {
"vs2015" {
VSX v140
}
"vs2017" {
VSX v150
}
}