diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index b9d8b5b9e75..88904f31509 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -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 diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index e7f45c36c1f..3a5ac2c17dd 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -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