aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2017-11-01 21:04:18 +0300
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2017-11-01 21:06:25 +0300
commit2b60cb12c9dec496c96a725b4ce3e0fcf9a956d8 (patch)
tree695a697e969f99882975a24a95d2b676da14fa30
parent45ceac90730c5bd4f53d5e9b2112861b1ef30f5f (diff)
downloadvcpkg-2b60cb12c9dec496c96a725b4ce3e0fcf9a956d8.tar.gz
vcpkg-2b60cb12c9dec496c96a725b4ce3e0fcf9a956d8.zip
[protobuf] Add feature packages for zlib
ZLib based features like Gzip streams.
-rw-r--r--ports/protobuf/CONTROL7
-rw-r--r--ports/protobuf/portfile.cmake8
2 files changed, 12 insertions, 3 deletions
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL
index b9d8b5b9e..88904f315 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 e7f45c36c..3a5ac2c17 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