From 30ff68062372eee0edb8722609362edcbccbb280 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Wed, 3 Jun 2020 15:51:55 +0200 Subject: [PATCH] Build libzip with static CRT and VS2019 --- LibZipSharp.props | 2 +- azure-pipelines.yml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/LibZipSharp.props b/LibZipSharp.props index 0ffd5fc..031f7c1 100644 --- a/LibZipSharp.props +++ b/LibZipSharp.props @@ -1,5 +1,5 @@ - <_LibZipSharpNugetVersion>1.0.14 + <_LibZipSharpNugetVersion>1.0.15 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4947e8..215dd49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,7 +16,10 @@ stages: jobs: - job: buildWindows pool: - vmImage: vs2017-win2016 + vmImage: windows-latest + variables: + LIBZIP_FEATURES: -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DBUILD_TOOLS=OFF -DBUILD_REGRESS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF + COMMON_CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0091=NEW steps: - script: | echo "Hello" @@ -29,7 +32,7 @@ stages: external\vcpkg\vcpkg.exe install zlib:x64-windows-static mkdir .\build\Windows\64 cd .\build\Windows\64 - cmake --config Release -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF -DCMAKE_C_FLAGS="/O2" -DCMAKE_TOOLCHAIN_FILE=..\..\..\external\vcpkg\scripts\buildsystems\vcpkg.cmake ..\..\..\external\libzip -G "Visual Studio 15 2017 Win64" -DBUILD_SHARED_LIBS=on -DVCPKG_TARGET_TRIPLET=x64-windows-static + cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x64-windows-static -A x64 ..\..\..\external\libzip cmake --build . --config Release -v displayName: "x64 Build" - script: | @@ -37,7 +40,7 @@ stages: external\vcpkg\vcpkg.exe install zlib:x86-windows-static mkdir .\build\Windows\32 cd .\build\Windows\32 - cmake --config Release -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF -DCMAKE_C_FLAGS="/O2" -DCMAKE_TOOLCHAIN_FILE=..\..\..\external\vcpkg\scripts\buildsystems\vcpkg.cmake ..\..\..\external\libzip -G "Visual Studio 15 2017" -DBUILD_SHARED_LIBS=on -DVCPKG_TARGET_TRIPLET=x86-windows-static + cmake $(LIBZIP_FEATURES) $(COMMON_CMAKE_PARAMS) -DZLIB_ROOT=..\..\..\external\vcpkg\installed\x86-windows-static -A Win32 ..\..\..\external\libzip cmake --build . --config Release -v displayName: "x86 Build" - task: ArchiveFiles@2