File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2+ index cd9d1c3..e707884 100644
3+ --- a/CMakeLists.txt
4+ +++ b/CMakeLists.txt
5+ @@ -112,7 +112,10 @@ endif()
6+
7+ if(WITH_OPENSSL)
8+ add_definitions(-DWITH_OPENSSL)
9+ - set(LIBS ${LIBS} ssl crypto)
10+ + find_package(OpenSSL REQUIRED)
11+ + if(OpenSSL_FOUND)
12+ + set(LIBS ${LIBS} OpenSSL::SSL OpenSSL::Crypto)
13+ + endif()
14+ endif()
15+
16+ if(WITH_GNUTLS)
17+ @@ -197,6 +200,7 @@ if(BUILD_STATIC)
18+ add_library(hv_static STATIC ${LIBHV_SRCS})
19+ target_compile_definitions(hv_static PRIVATE HV_STATICLIB)
20+ target_include_directories(hv_static PRIVATE ${LIBHV_SRCDIRS})
21+ + target_link_libraries(hv_static ${LIBS})
22+ install(TARGETS hv_static DESTINATION lib)
23+ add_custom_target(libhv_static DEPENDS hv_static)
24+ endif()
Original file line number Diff line number Diff line change @@ -4,11 +4,18 @@ vcpkg_from_github(
44 REF v1.2.4
55 SHA512 5732800970180294DCEB329F25D22B1A7178739A2A5A2CE32E030F4FD38055A6298797D26E7FF5525AC662059FF0AAEDB8ABC200E0BA9E4EEBEB5846FB53F4D0
66 HEAD_REF master
7+ PATCHES
8+ fix-find_package.patch
79)
810
911string (COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE} " "static" BUILD_STATIC)
1012string (COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE} " "dynamic" BUILD_SHARED)
1113
14+ vcpkg_check_features (OUT_FEATURE_OPTIONS FEATURE_OPTIONS
15+ FEATURES
16+ ssl WITH_OPENSSL
17+ )
18+
1219vcpkg_cmake_configure (
1320 SOURCE_PATH "${SOURCE_PATH} "
1421 DISABLE_PARALLEL_CONFIGURE
@@ -17,6 +24,7 @@ vcpkg_cmake_configure(
1724 -DBUILD_UNITTEST=OFF
1825 -DBUILD_STATIC=${BUILD_STATIC}
1926 -DBUILD_SHARED=${BUILD_SHARED}
27+ ${FEATURE_OPTIONS}
2028)
2129
2230vcpkg_cmake_install ()
Original file line number Diff line number Diff line change 11{
22 "name" : " libhv" ,
33 "version" : " 1.2.4" ,
4+ "port-version" : 1 ,
45 "description" : " Libhv is a C/C++ network library similar to libevent/libuv." ,
56 "homepage" : " https://github.com/ithewei/libhv" ,
67 "license" : " BSD-3-Clause" ,
1011 "name" : " vcpkg-cmake" ,
1112 "host" : true
1213 }
13- ]
14+ ],
15+ "features" : {
16+ "ssl" : {
17+ "description" : " with openssl library" ,
18+ "dependencies" : [
19+ " openssl"
20+ ]
21+ }
22+ }
1423}
Original file line number Diff line number Diff line change 36103610 },
36113611 "libhv" : {
36123612 "baseline" : " 1.2.4" ,
3613- "port-version" : 0
3613+ "port-version" : 1
36143614 },
36153615 "libhydrogen" : {
36163616 "baseline" : " 2021-12-02" ,
Original file line number Diff line number Diff line change 11{
22 "versions" : [
3+ {
4+ "git-tree" : " b5953fb3634520fafd04507d0a7266e92c87a129" ,
5+ "version" : " 1.2.4" ,
6+ "port-version" : 1
7+ },
38 {
49 "git-tree" : " 9867c0ba3cb7de25db2dd22fdd5633de7faae440" ,
510 "version" : " 1.2.4" ,
You can’t perform that action at this time.
0 commit comments