mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-15 06:35:25 +02:00
vs2019 support
This commit is contained in:
parent
e41ec95f92
commit
55aef9fa42
2
build_vs160.cmd
Normal file
2
build_vs160.cmd
Normal file
@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
buildwin 160 build shared both Win32 samples tests devenv
|
28
buildwin.cmd
28
buildwin.cmd
@ -5,9 +5,9 @@ rem
|
||||
rem buildwin.cmd
|
||||
rem
|
||||
rem POCO C++ Libraries command-line build script
|
||||
rem for MS Visual Studio 2008 to 2013
|
||||
rem for MS Visual Studio 2008 to 2019
|
||||
rem
|
||||
rem Copyright (c) 2006-2017 by Applied Informatics Software Engineering GmbH
|
||||
rem Copyright (c) 2006-2019 by Applied Informatics Software Engineering GmbH
|
||||
rem and Contributors.
|
||||
rem
|
||||
rem Original version by Aleksandar Fabijanic.
|
||||
@ -16,7 +16,7 @@ rem
|
||||
rem Usage:
|
||||
rem ------
|
||||
rem buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
|
||||
rem VS_VERSION: 90|100|110|120|140|150
|
||||
rem VS_VERSION: 90|100|110|120|140|150|160
|
||||
rem ACTION: build|rebuild|clean
|
||||
rem LINKMODE: static_mt|static_md|shared|all
|
||||
rem CONFIGURATION: release|debug|both
|
||||
@ -44,13 +44,17 @@ set LIB=%LIB%;%MYSQL_LIB%
|
||||
set POCO_BASE=%CD%
|
||||
set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH%
|
||||
|
||||
rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150}
|
||||
rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150 | 160}
|
||||
if "%1"=="" goto usage
|
||||
set VS_VERSION=vs%1
|
||||
if %VS_VERSION%==vs150 (
|
||||
if %VS_VERSION%==vs160 (
|
||||
set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat
|
||||
) else (
|
||||
set VS_VARSALL=..\..\VC\vcvarsall.bat
|
||||
if %VS_VERSION%==vs150 (
|
||||
set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat
|
||||
) else (
|
||||
set VS_VARSALL=..\..\VC\vcvarsall.bat
|
||||
)
|
||||
)
|
||||
rem PLATFORM [Win32|x64|WinCE|WEC2013]
|
||||
set PLATFORM=%5
|
||||
@ -102,6 +106,14 @@ if not defined VCINSTALLDIR (
|
||||
) else (
|
||||
call "%VS150COMNTOOLS%%VS_VARSALL%" x86 8.1
|
||||
)
|
||||
) else (
|
||||
if %VS_VERSION%==vs160 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS160COMNTOOLS%%VS_VARSALL%" x86_amd64 8.1
|
||||
) else (
|
||||
call "%VS160COMNTOOLS%%VS_VARSALL%" x86 8.1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -123,6 +135,7 @@ if %VS_VERSION%==vs110 (set VCPROJ_EXT=vcxproj)
|
||||
if %VS_VERSION%==vs120 (set VCPROJ_EXT=vcxproj)
|
||||
if %VS_VERSION%==vs140 (set VCPROJ_EXT=vcxproj)
|
||||
if %VS_VERSION%==vs150 (set VCPROJ_EXT=vcxproj)
|
||||
if %VS_VERSION%==vs160 (set VCPROJ_EXT=vcxproj)
|
||||
|
||||
if "%8"=="" goto use_devenv
|
||||
set BUILD_TOOL=%8
|
||||
@ -134,6 +147,7 @@ if "%VS_VERSION%"=="vs110" (set BUILD_TOOL=msbuild)
|
||||
if "%VS_VERSION%"=="vs120" (set BUILD_TOOL=msbuild)
|
||||
if "%VS_VERSION%"=="vs140" (set BUILD_TOOL=msbuild)
|
||||
if "%VS_VERSION%"=="vs150" (set BUILD_TOOL=msbuild)
|
||||
if "%VS_VERSION%"=="vs160" (set BUILD_TOOL=msbuild)
|
||||
:use_custom
|
||||
if not "%BUILD_TOOL%"=="msbuild" (set USEENV=/useenv)
|
||||
if "%BUILD_TOOL%"=="msbuild" (
|
||||
@ -150,6 +164,7 @@ if "%VS_VERSION%"=="vs110" (goto msbuildok)
|
||||
if "%VS_VERSION%"=="vs120" (goto msbuildok)
|
||||
if "%VS_VERSION%"=="vs140" (goto msbuildok)
|
||||
if "%VS_VERSION%"=="vs150" (goto msbuildok)
|
||||
if "%VS_VERSION%"=="vs160" (goto msbuildok)
|
||||
if "%BUILD_TOOL%"=="msbuild" (
|
||||
echo "Cannot use msbuild with Visual Studio 2008 or earlier."
|
||||
exit /b 2
|
||||
@ -194,6 +209,7 @@ if %VS_VERSION%==vs110 (set EXTRASW=/m /p:VisualStudioVersion=11.0)
|
||||
if %VS_VERSION%==vs120 (set EXTRASW=/m /p:VisualStudioVersion=12.0)
|
||||
if %VS_VERSION%==vs140 (set EXTRASW=/m /p:VisualStudioVersion=14.0)
|
||||
if %VS_VERSION%==vs150 (set EXTRASW=/m /p:VisualStudioVersion=15.0)
|
||||
if %VS_VERSION%==vs160 (set EXTRASW=/m /p:VisualStudioVersion=16.0)
|
||||
)
|
||||
|
||||
rem SAMPLES [samples|nosamples]
|
||||
|
16
buildwin.ps1
16
buildwin.ps1
@ -4,7 +4,7 @@
|
||||
# Usage:
|
||||
# ------
|
||||
# buildwin.ps1 [-poco_base dir]
|
||||
# [-vs_version 150 | 140 | 120 | 110 | 100 | 90]
|
||||
# [-vs_version 160 | 150 | 140 | 120 | 110 | 100 | 90]
|
||||
# [-action build | rebuild | clean]
|
||||
# [-linkmode shared | static_mt | static_md | all]
|
||||
# [-config release | debug | both]
|
||||
@ -23,7 +23,7 @@ Param
|
||||
[string] $poco_base,
|
||||
|
||||
[Parameter()]
|
||||
[ValidateSet(90, 100, 110, 120, 140, 150)]
|
||||
[ValidateSet(90, 100, 110, 120, 140, 150, 160)]
|
||||
[int] $vs_version,
|
||||
|
||||
[Parameter()]
|
||||
@ -78,7 +78,8 @@ function Set-Environment
|
||||
|
||||
if ($vs_version -eq 0)
|
||||
{
|
||||
if ($Env:VS150COMNTOOLS -ne '') { $script:vs_version = 150 }
|
||||
if ($Env:VS160COMNTOOLS -ne '') { $script:vs_version = 160 }
|
||||
elseif ($Env:VS150COMNTOOLS -ne '') { $script:vs_version = 150 }
|
||||
elseif ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 }
|
||||
elseif ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 }
|
||||
elseif ($Env:VS110COMNTOOLS -ne '') { $script:vs_version = 110 }
|
||||
@ -120,7 +121,12 @@ function Set-Environment
|
||||
$CommandArg = ''
|
||||
if ($platform -eq 'x64') { $CommandArg = "amd64" }
|
||||
else { $CommandArg = "x86" }
|
||||
if ($vs_version -ge 150)
|
||||
if ($vs_version -ge 160)
|
||||
{
|
||||
$Command = "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
$script:msbuild_exe = "$($vsdir)\..\..\MSBuild\Current\Bin\MSBuild.exe"
|
||||
}
|
||||
elseif ($vs_version -ge 150)
|
||||
{
|
||||
$Command = "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
$script:msbuild_exe = "$($vsdir)\..\..\MSBuild\15.0\Bin\MSBuild.exe"
|
||||
@ -149,7 +155,7 @@ function Process-Input
|
||||
Write-Host 'Usage:'
|
||||
Write-Host '------'
|
||||
Write-Host 'buildwin.ps1 [-poco_base dir]'
|
||||
Write-Host ' [-vs_version 150 | 140 | 120 | 110 | 100 | 90]'
|
||||
Write-Host ' [-vs_version 160 | 150 | 140 | 120 | 110 | 100 | 90]'
|
||||
Write-Host ' [-action build | rebuild | clean]'
|
||||
Write-Host ' [-linkmode shared | static_mt | static_md | all]'
|
||||
Write-Host ' [-config release | debug | both]'
|
||||
|
Loading…
x
Reference in New Issue
Block a user