[protobuf] Add feature packages for zlib

ZLib based features like Gzip streams.
This commit is contained in:
Konstantin Podsvirov 2017-11-01 21:04:18 +03:00
parent 45ceac9073
commit 2b60cb12c9
2 changed files with 12 additions and 3 deletions

View File

@ -1,4 +1,7 @@
Source: protobuf
Version: 3.4.1-1
Build-Depends: zlib
Version: 3.4.1-2
Description: Protocol Buffers - Google's data interchange format
Feature: zlib
Description: ZLib based features like Gzip streams
Build-Depends: zlib

View File

@ -47,12 +47,18 @@ else()
set(protobuf_MSVC_STATIC_RUNTIME OFF)
endif()
if("zlib" IN_LIST FEATURES)
set(protobuf_WITH_ZLIB ON)
else()
set(protobuf_WITH_ZLIB OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/cmake
OPTIONS
-Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS}
-Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME}
-Dprotobuf_WITH_ZLIB=ON
-Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB}
-Dprotobuf_BUILD_TESTS=OFF
-Dprotobuf_BUILD_COMPILER=${protobuf_BUILD_COMPILER}
-DCMAKE_INSTALL_CMAKEDIR=share/protobuf