aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiertw <48276757+siertw@users.noreply.github.com>2019-03-06 19:24:12 +0100
committerPhil Christensen <philc@microsoft.com>2019-03-06 10:24:12 -0800
commit8e65c100584d08c1d1416099045545b9f8a86a87 (patch)
tree863b3447ff9dd66354e92c41740205e86f9ca9e3
parent41a9614308cdb22237f7fe38a68c70b53273da90 (diff)
downloadvcpkg-8e65c100584d08c1d1416099045545b9f8a86a87.tar.gz
vcpkg-8e65c100584d08c1d1416099045545b9f8a86a87.zip
Create a feature package for building libssh with zlib, rather than always including it by default. (#5563)
-rw-r--r--ports/libssh/CONTROL6
-rw-r--r--ports/libssh/portfile.cmake7
2 files changed, 12 insertions, 1 deletions
diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL
index aff3dbdf1..3ecd7853e 100644
--- a/ports/libssh/CONTROL
+++ b/ports/libssh/CONTROL
@@ -1,4 +1,8 @@
Source: libssh
Version: 0.7.6
Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side
-Build-Depends: zlib, openssl
+Build-Depends: openssl
+
+Feature: zlib
+Description: libssh with zlib
+Build-Depends: zlib
diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake
index 89d2af1fd..d9f5962a0 100644
--- a/ports/libssh/portfile.cmake
+++ b/ports/libssh/portfile.cmake
@@ -30,6 +30,12 @@ vcpkg_extract_source_archive_ex(
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB)
+if(zlib IN_LIST FEATURES)
+ set(WITH_ZLIB ON)
+else()
+ set(WITH_ZLIB OFF)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -39,6 +45,7 @@ vcpkg_configure_cmake(
-DWITH_TESTING=OFF
-DWITH_NACL=OFF
-DWITH_GSSAPI=OFF
+ -DWITH_ZLIB=${WITH_ZLIB}
)
vcpkg_install_cmake()