[Botan] Add zlib option (#23552)

* ADD ZLIB OPTION

* update version

* version

* update version
This commit is contained in:
Frank 2022-03-17 05:29:17 +08:00 committed by GitHub
parent 4a34f755de
commit 76049547cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 2 deletions

View File

@ -52,6 +52,7 @@ endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
amalgamation BOTAN_AMALGAMATION
zlib BOTAN_WITH_ZLIB
)
function(BOTAN_BUILD BOTAN_BUILD_TYPE)
@ -94,6 +95,11 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE)
if("-DBOTAN_AMALGAMATION=ON" IN_LIST FEATURE_OPTIONS)
list(APPEND configure_arguments --amalgamation)
endif()
if("-DBOTAN_WITH_ZLIB=ON" IN_LIST FEATURE_OPTIONS)
list(APPEND configure_arguments --with-zlib)
list(APPEND configure_arguments --with-external-includedir="${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include")
list(APPEND configure_arguments --with-external-libdir="${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib")
endif()
vcpkg_execute_required_process(
COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py" ${configure_arguments}
@ -146,6 +152,7 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
[[${prefix}/include]]
)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/botan-2.pc" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/botan-2.pc")

View File

@ -1,7 +1,7 @@
{
"name": "botan",
"version": "2.18.1",
"port-version": 8,
"port-version": 9,
"description": "A cryptography library written in C++11",
"homepage": "https://botan.randombit.net",
"license": "BSD-2-Clause",
@ -9,6 +9,12 @@
"features": {
"amalgamation": {
"description": "Do an amalgamation build of the library"
},
"zlib": {
"description": "Build with zlib. Enable compression pipes.",
"dependencies": [
"zlib"
]
}
}
}

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a091e7d5a75af9eadbaa696b79e44d726deb47fe",
"version": "2.18.1",
"port-version": 9
},
{
"git-tree": "267c31f3759881d233529d28ec78e2a0c8d1e9b4",
"version": "2.18.1",

View File

@ -1126,7 +1126,7 @@
},
"botan": {
"baseline": "2.18.1",
"port-version": 8
"port-version": 9
},
"box2d": {
"baseline": "2.4.1",