[poco] Revise netssl, add crypto (#29754)

* [poco] Add feature 'crypto'

* NetSSL_Win is a 'not yet released' alternative API

* Remove outdated comments

* Update versions

* Don't use option wrongly

---------

Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
Kai Pastor 2023-03-03 20:50:00 +01:00 committed by GitHub
parent 39f3c5c343
commit 8daf70c56b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 21 deletions

View File

@ -28,24 +28,19 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
crypto ENABLE_CRYPTO
netssl ENABLE_NETSSL
pdf ENABLE_PDF
sqlite3 ENABLE_DATA_SQLITE
postgresql ENABLE_DATA_POSTGRESQL
)
if("netssl" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND FEATURE_OPTIONS
-DENABLE_NETSSL_WIN=ON
-DENABLE_NETSSL=OFF
-DENABLE_CRYPTO=OFF
)
else()
list(APPEND FEATURE_OPTIONS
-DENABLE_NETSSL=ON
-DENABLE_CRYPTO=ON
)
endif()
# POCO_ENABLE_NETSSL_WIN:
# Use the unreleased NetSSL_Win module instead of (OpenSSL) NetSSL.
# This is a variable which can be set in the triplet file.
if(POCO_ENABLE_NETSSL_WIN)
string(REPLACE "ENABLE_NETSSL" "ENABLE_NETSSL_WIN" FEATURE_OPTIONS "${FEATURE_OPTIONS}")
list(APPEND FEATURE_OPTIONS "-DENABLE_NETSSL:BOOL=OFF")
endif()
if ("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES)
@ -64,14 +59,11 @@ vcpkg_cmake_configure(
-DPOCO_MT=${POCO_MT}
-DENABLE_TESTS=OFF
# Allow enabling and disabling components
# POCO_ENABLE_SQL_ODBC, POCO_ENABLE_SQL_MYSQL and POCO_ENABLE_SQL_POSTGRESQL are
# defined on the fly if the required librairies are present
-DENABLE_ENCODINGS=ON
-DENABLE_ENCODINGS_COMPILER=ON
-DENABLE_XML=ON
-DENABLE_JSON=ON
-DENABLE_MONGODB=ON
# -DPOCO_ENABLE_SQL_SQLITE=ON # SQLITE are not supported.
-DENABLE_REDIS=ON
-DENABLE_UTIL=ON
-DENABLE_NET=ON

View File

@ -1,7 +1,7 @@
{
"name": "poco",
"version": "1.12.4",
"port-version": 3,
"port-version": 4,
"description": "Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.",
"homepage": "https://github.com/pocoproject/poco",
"license": "BSL-1.0",
@ -20,6 +20,12 @@
"zlib"
],
"features": {
"crypto": {
"description": "Crypto support",
"dependencies": [
"openssl"
]
},
"mariadb": {
"description": "MariaDB support for POCO",
"dependencies": [
@ -33,11 +39,17 @@
]
},
"netssl": {
"description": "NetSSL support for POCO",
"description": [
"NetSSL support for POCO",
"By default, this feature uses the OpenSSL implementation. The `POCO_ENABLE_NETSSL_WIN` triplet variable can be used to switch to the NetSSL_Win module."
],
"dependencies": [
{
"name": "openssl",
"platform": "!windows"
"name": "poco",
"default-features": false,
"features": [
"crypto"
]
}
]
},

View File

@ -6113,7 +6113,7 @@
},
"poco": {
"baseline": "1.12.4",
"port-version": 3
"port-version": 4
},
"podofo": {
"baseline": "0.9.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5fb22214a00901cbf3697a76442f5f360cbc74ef",
"version": "1.12.4",
"port-version": 4
},
{
"git-tree": "6d2166180316a03fcbef817dc1bb6c1573fb9f32",
"version": "1.12.4",