pineapple/externals/vcpkg/ports/libhv/fix-find_package.patch
2022-07-23 03:01:36 +02:00

24 lines
773 B
Diff
Executable file

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()