mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:58:59 +08:00
[usockets] WolfSSL feature (#32162)
* Add wolfSSL for usockets * Add port version * Format manifest * Update missing dependency * Update usockets.json
This commit is contained in:
parent
a50b802d6b
commit
20b059fb8f
@ -12,6 +12,16 @@ else()
|
||||
set(NOT_USE_OPENSSL "-DLIBUS_NO_SSL")
|
||||
endif()
|
||||
|
||||
if (CMAKE_USE_WOLFSSL)
|
||||
find_package(wolfssl REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
set(USE_WOLFSSL "-DUSE_WOLFSSL -DLIBUS_USE_WOLFSSL")
|
||||
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||
else()
|
||||
set(NOT_USE_WOLFSSL "-DLIBUS_NO_SSL")
|
||||
endif()
|
||||
|
||||
find_package(libuv CONFIG REQUIRED)
|
||||
if (TARGET uv)
|
||||
set(LIBUV_LIBRARY uv)
|
||||
@ -33,6 +43,13 @@ if (CMAKE_USE_OPENSSL)
|
||||
list(APPEND USOCKETS_EXT_LIBS OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif()
|
||||
|
||||
if (CMAKE_USE_WOLFSSL)
|
||||
find_package(wolfssl REQUIRED)
|
||||
#file(GLOB SSL_SOURCES src/crypto/*.c*)
|
||||
#list(APPEND SOURCES ${SSL_SOURCES})
|
||||
list(APPEND USOCKETS_EXT_LIBS wolfssl)
|
||||
endif()
|
||||
|
||||
if (CMAKE_USE_EVENT)
|
||||
file(GLOB SSL_SOURCES src/eventing/*.c)
|
||||
list(APPEND SOURCES ${SSL_SOURCES})
|
||||
@ -50,7 +67,7 @@ if (${LIBUS_USE_LIBUV})
|
||||
target_compile_definitions(uSockets PRIVATE -DLIBUS_USE_LIBUV)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(uSockets PRIVATE ${NOT_USE_OPENSSL} ${USE_OPENSSL})
|
||||
target_compile_definitions(uSockets PRIVATE ${NOT_USE_OPENSSL} ${USE_OPENSSL} ${USE_WOLFSSL} ${NOT_USE_WOLFSSL})
|
||||
target_include_directories(uSockets PUBLIC ${OPENSSL_INCLUDE_DIR} ${USOCKETS_EXT_INCLUDE_DIR} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/src")
|
||||
target_link_libraries(uSockets PUBLIC ${OPENSSL_LIBRARIES} ${LIBUV_LIBRARY} ${USOCKETS_EXT_LIBS})
|
||||
|
||||
|
@ -22,6 +22,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
ssl CMAKE_USE_OPENSSL
|
||||
event CMAKE_USE_EVENT
|
||||
network CMAKE_USE_NETWORK
|
||||
wolfssl CMAKE_USE_WOLFSSL
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "usockets",
|
||||
"version": "0.8.6",
|
||||
"port-version": 1,
|
||||
"description": "Miniscule cross-platform eventing, networking & crypto for async applications",
|
||||
"homepage": "https://github.com/uNetworking/uSockets",
|
||||
"license": "Apache-2.0",
|
||||
@ -26,6 +27,12 @@
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"wolfssl": {
|
||||
"description": "Build usockets with wolfssl support",
|
||||
"dependencies": [
|
||||
"wolfssl"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8314,7 +8314,7 @@
|
||||
},
|
||||
"usockets": {
|
||||
"baseline": "0.8.6",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"usrsctp": {
|
||||
"baseline": "0.9.5.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "bbfb3ab5fe6fc9c96028f24a129c8ebab2883553",
|
||||
"version": "0.8.6",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "648715b141f4bb501ebc83d09da547ee0b3fe467",
|
||||
"version": "0.8.6",
|
||||
|
Loading…
Reference in New Issue
Block a user