mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-15 06:08:07 +08:00
[apr-util] Add crypto feature and don't require OpenSSL if not needed (#27644)
* [apr-util] add crypto feature * [apr-util] Use CMake variables to control OpenSSL * [apr-util] remove disable find package
This commit is contained in:
parent
57ae838ee8
commit
94b63bd8f2
@ -4,6 +4,12 @@ vcpkg_download_distfile(ARCHIVE
|
|||||||
SHA512 40eff8a37c0634f7fdddd6ca5e596b38de15fd10767a34c30bbe49c632816e8f3e1e230678034f578dd5816a94f246fb5dfdf48d644829af13bf28de3225205d
|
SHA512 40eff8a37c0634f7fdddd6ca5e596b38de15fd10767a34c30bbe49c632816e8f3e1e230678034f578dd5816a94f246fb5dfdf48d644829af13bf28de3225205d
|
||||||
)
|
)
|
||||||
|
|
||||||
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
|
FEATURES
|
||||||
|
crypto APU_HAVE_CRYPTO
|
||||||
|
crypto CMAKE_REQUIRE_FIND_PACKAGE_OpenSSL
|
||||||
|
)
|
||||||
|
|
||||||
if(VCPKG_TARGET_IS_WINDOWS)
|
if(VCPKG_TARGET_IS_WINDOWS)
|
||||||
vcpkg_extract_source_archive(
|
vcpkg_extract_source_archive(
|
||||||
SOURCE_PATH
|
SOURCE_PATH
|
||||||
@ -16,6 +22,8 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
|||||||
|
|
||||||
vcpkg_cmake_configure(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
|
OPTIONS
|
||||||
|
${FEATURE_OPTIONS}
|
||||||
OPTIONS_DEBUG
|
OPTIONS_DEBUG
|
||||||
-DDISABLE_INSTALL_HEADERS=ON
|
-DDISABLE_INSTALL_HEADERS=ON
|
||||||
)
|
)
|
||||||
@ -54,6 +62,14 @@ else()
|
|||||||
ARCHIVE "${ARCHIVE}"
|
ARCHIVE "${ARCHIVE}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ("crypto" IN_LIST FEATURES)
|
||||||
|
set(CRYPTO_OPTIONS
|
||||||
|
"--with-crypto=yes"
|
||||||
|
"--with-openssl=${CURRENT_INSTALLED_DIR}")
|
||||||
|
else()
|
||||||
|
set(CRYPTO_OPTIONS "--with-crypto=no")
|
||||||
|
endif()
|
||||||
|
|
||||||
# To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure".
|
# To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure".
|
||||||
# The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C".
|
# The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C".
|
||||||
# For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content):
|
# For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content):
|
||||||
@ -71,9 +87,9 @@ else()
|
|||||||
SOURCE_PATH "${SOURCE_PATH}"
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
OPTIONS
|
OPTIONS
|
||||||
"--prefix=${CURRENT_INSTALLED_DIR}"
|
"--prefix=${CURRENT_INSTALLED_DIR}"
|
||||||
|
${CRYPTO_OPTIONS}
|
||||||
"--with-apr=${CURRENT_INSTALLED_DIR}/tools/apr"
|
"--with-apr=${CURRENT_INSTALLED_DIR}/tools/apr"
|
||||||
"--with-openssl=${CURRENT_INSTALLED_DIR}"
|
"--with-expat=${CURRENT_INSTALLED_DIR}"
|
||||||
"-with-expat=${CURRENT_INSTALLED_DIR}"
|
|
||||||
"${CONFIGURE_PARAMETER_1}"
|
"${CONFIGURE_PARAMETER_1}"
|
||||||
"${CONFIGURE_PARAMETER_2}"
|
"${CONFIGURE_PARAMETER_2}"
|
||||||
"${CONFIGURE_PARAMETER_3}"
|
"${CONFIGURE_PARAMETER_3}"
|
||||||
|
@ -1,18 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "apr-util",
|
"name": "apr-util",
|
||||||
"version": "1.6.1",
|
"version": "1.6.1",
|
||||||
"port-version": 9,
|
"port-version": 10,
|
||||||
"description": "Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation",
|
"description": "Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation",
|
||||||
"homepage": "https://apr.apache.org/",
|
"homepage": "https://apr.apache.org/",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"apr",
|
"apr",
|
||||||
"expat",
|
"expat",
|
||||||
"openssl",
|
|
||||||
{
|
{
|
||||||
"name": "vcpkg-cmake",
|
"name": "vcpkg-cmake",
|
||||||
"host": true,
|
"host": true,
|
||||||
"platform": "windows"
|
"platform": "windows"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"features": {
|
||||||
|
"crypto": {
|
||||||
|
"description": "Crypto support",
|
||||||
|
"dependencies": [
|
||||||
|
"openssl"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "41451c5e1e1fa8344f6c2d1baf6c0f14b656c433",
|
||||||
|
"version": "1.6.1",
|
||||||
|
"port-version": 10
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "b6d7bb58f16bd75a40a434742d0c0a12b89645d4",
|
"git-tree": "b6d7bb58f16bd75a40a434742d0c0a12b89645d4",
|
||||||
"version": "1.6.1",
|
"version": "1.6.1",
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
},
|
},
|
||||||
"apr-util": {
|
"apr-util": {
|
||||||
"baseline": "1.6.1",
|
"baseline": "1.6.1",
|
||||||
"port-version": 9
|
"port-version": 10
|
||||||
},
|
},
|
||||||
"apsi": {
|
"apsi": {
|
||||||
"baseline": "0.8.2",
|
"baseline": "0.8.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user