From 50ae0b958a8bd1352938fafef0d3949a47dc323e Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Fri, 21 Aug 2020 09:30:27 +0200 Subject: [PATCH] Build with Visual Studio 2019 --- appveyor.yml | 4 ++-- build.bat | 4 ++-- test.bat | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d2f0b719..40159b74 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,8 +5,8 @@ branches: - /travis/ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - GYP_MSVS_VERSION: 2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + GYP_MSVS_VERSION: 2019 PDFium_BRANCH: $(APPVEYOR_REPO_TAG_NAME) matrix: - PDFium_V8: enabled diff --git a/build.bat b/build.bat index 8b41f6b7..17d77769 100644 --- a/build.bat +++ b/build.bat @@ -1,12 +1,12 @@ : Variables to provide: -: GYP_MSVS_VERSION = 2017 | 2015 +: GYP_MSVS_VERSION = 2019 | 2017 | 2015 : CONFIGURATION = Debug | Release : PLATFORM = x86 | x64 : PDFium_BRANCH = master | chromium/3211 | ... : PDFium_V8 = enabled : Input -set WindowsSDK_DIR=C:\Program Files (x86)\Windows Kits\10\bin\%PLATFORM% +set WindowsSDK_DIR=C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\%PLATFORM% set DepotTools_URL=https://storage.googleapis.com/chrome-infra/depot_tools.zip set DepotTools_DIR=%CD%\depot_tools set PDFium_URL=https://pdfium.googlesource.com/pdfium.git diff --git a/test.bat b/test.bat index c3bd273a..6f9b595a 100644 --- a/test.bat +++ b/test.bat @@ -1,13 +1,14 @@ set SOURCE_DIR=%CD%\example set PDFium_DIR=%CD%\staging -set CMAKE_GENERATOR=Visual Studio 15 2017 +set CMAKE_GENERATOR=Visual Studio 16 2019 -if "%PLATFORM%"=="x64" set CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64 +if "%PLATFORM%"=="x64" (set CMAKE_GENERATOR_PLATFORM=x64) +else (set CMAKE_GENERATOR_PLATFORM=Win32) @echo on mkdir build cd build -cmake -G "%CMAKE_GENERATOR%" "%SOURCE_DIR%" +cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_GENERATOR_PLATFORM%" "%SOURCE_DIR%" cmake --build . ctest --output-on-failure . \ No newline at end of file