[libhv] update to 1.2.6 (#25971)

* [libhv] update to 1.2.6

* update portfile.cmake

* x-add-version
This commit is contained in:
Lily Wang 2022-07-25 12:12:59 -07:00 committed by GitHub
parent d73287bbc1
commit 8d9d56652f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 62 deletions

View File

@ -1,24 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd9d1c3..e707884 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,7 +112,10 @@ endif()
if(WITH_OPENSSL)
add_definitions(-DWITH_OPENSSL)
- set(LIBS ${LIBS} ssl crypto)
+ find_package(OpenSSL REQUIRED)
+ if(OpenSSL_FOUND)
+ set(LIBS ${LIBS} OpenSSL::SSL OpenSSL::Crypto)
+ endif()
endif()
if(WITH_GNUTLS)
@@ -197,6 +200,7 @@ if(BUILD_STATIC)
add_library(hv_static STATIC ${LIBHV_SRCS})
target_compile_definitions(hv_static PRIVATE HV_STATICLIB)
target_include_directories(hv_static PRIVATE ${LIBHV_SRCDIRS})
+ target_link_libraries(hv_static ${LIBS})
install(TARGETS hv_static DESTINATION lib)
add_custom_target(libhv_static DEPENDS hv_static)
endif()

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f478fb4..1e3556a 100644
index 59e9b41..f0a162e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,9 +196,10 @@ list_source_directories(LIBHV_SRCS ${LIBHV_SRCDIRS})
@@ -215,7 +215,7 @@ list_source_directories(LIBHV_SRCS ${LIBHV_SRCDIRS})
if(BUILD_SHARED)
add_library(hv SHARED ${LIBHV_SRCS})
target_compile_definitions(hv PRIVATE HV_DYNAMICLIB)
@ -10,27 +10,13 @@ index f478fb4..1e3556a 100644
+ target_include_directories(hv PRIVATE ${LIBHV_SRCDIRS} INTERFACE $<INSTALL_INTERFACE:include>)
target_link_libraries(hv ${LIBS})
install(TARGETS hv
+ EXPORT libhvConfig
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
@@ -208,14 +209,17 @@ endif()
EXPORT libhvConfig
@@ -228,7 +228,7 @@ endif()
if(BUILD_STATIC)
add_library(hv_static STATIC ${LIBHV_SRCS})
target_compile_definitions(hv_static PRIVATE HV_STATICLIB)
- target_include_directories(hv_static PRIVATE ${LIBHV_SRCDIRS})
+ target_include_directories(hv_static PRIVATE ${LIBHV_SRCDIRS} INTERFACE $<INSTALL_INTERFACE:include>)
target_link_libraries(hv_static ${LIBS})
- install(TARGETS hv_static DESTINATION lib)
+ install(TARGETS hv_static
+ EXPORT libhvConfig
+ ARCHIVE DESTINATION lib)
add_custom_target(libhv_static DEPENDS hv_static)
endif()
file(INSTALL ${LIBHV_HEADERS} DESTINATION include/hv)
install(FILES ${LIBHV_HEADERS} DESTINATION include/hv)
+install(EXPORT libhvConfig DESTINATION lib/cmake/libhv)
if(BUILD_SHARED)
set(HV_LIBRARIES hv CACHE INTERNAL "link hv libraries")
install(TARGETS hv_static
EXPORT libhvConfig

View File

@ -1,12 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ithewei/libhv
REF v1.2.4
SHA512 5732800970180294DCEB329F25D22B1A7178739A2A5A2CE32E030F4FD38055A6298797D26E7FF5525AC662059FF0AAEDB8ABC200E0BA9E4EEBEB5846FB53F4D0
REF 8d14d1a6cd4accbda9e081716a59395b523303f6 #v1.2.6
SHA512 d40063f2b2f8191965fd4434b80a17f505819a20fd63aefa63c08663d0acc82d086338f0382ab70289dff0417a8ec922f993d36c4007a1a13c7ce34d71018f83
HEAD_REF master
PATCHES
fix-find_package.patch
fix-export_cmake.patch #Sync up the upstream changes
fix-include_header.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
@ -34,13 +33,3 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libhv)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/hv.dll")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/hv.dll" "${CURRENT_PACKAGES_DIR}/bin/hv.dll")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/hv.dll")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/hv.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/hv.dll")
endif()

View File

@ -1,7 +1,6 @@
{
"name": "libhv",
"version": "1.2.4",
"port-version": 2,
"version": "1.2.6",
"description": "Libhv is a C/C++ network library similar to libevent/libuv.",
"homepage": "https://github.com/ithewei/libhv",
"license": "BSD-3-Clause",

View File

@ -3705,8 +3705,8 @@
"port-version": 0
},
"libhv": {
"baseline": "1.2.4",
"port-version": 2
"baseline": "1.2.6",
"port-version": 0
},
"libhydrogen": {
"baseline": "2022-06-21",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e382c63e132653ac3e2062b4fa0d182242c4da3a",
"version": "1.2.6",
"port-version": 0
},
{
"git-tree": "3533f306ae38ad29c619656d006ae9536bfcdcb4",
"version": "1.2.4",