diff --git a/Depends.cmake b/Depends.cmake

index 93ce3b3..e2be76d 100644

--- a/Depends.cmake

+++ b/Depends.cmake

@@ -12,15 +12,26 @@ if (NOT IOS AND NOT ANDROID)

     set (iHaveCurl NO)

 endif ()

 if (TFDN_ENABLE_TLSREQUEST)

- pkg_check_modules (OPENSSL eopenssl11) # BSD

- if (OPENSSL_FOUND)

- set (EOPENSSL_FOUND YES)

- else ()

- pkg_check_modules (OPENSSL openssl)

- endif ()

- else ()

     set (OPENSSL_FOUND NO)

     set (iHaveOpenSSL NO)

+ if (FREEBSD)

+ # Try the system-provided libraries first.

+ find_library (LIBSSL ssl)

+ find_library (LIBCRYPTO crypto)

+ if (LIBSSL AND LIBCRYPTO)

+ message (STATUS "Using system-provided libssl: ${LIBSSL}")

+ add_library (libssl INTERFACE)

+ target_link_libraries (libssl INTERFACE ${LIBSSL} ${LIBCRYPTO})

+ set (OPENSSL_FOUND YES)

+ else ()

+ pkg_check_modules (OPENSSL eopenssl11)

+ if (OPENSSL_FOUND)

+ set (EOPENSSL_FOUND YES)

+ endif ()

+ endif ()

+ else ()

+ pkg_check_modules (OPENSSL openssl)

+ endif ()

 endif ()

 # Unicode text strings

 set (UNISTRING_DIR "" CACHE PATH "Location of libunistring")

@@ -121,6 +132,10 @@ macro (tfdn_link_depends target mode)

     target_link_libraries (${target} ${mode} ${CURL_LIBRARIES})

 endif ()

 if (OPENSSL_FOUND)

- target_link_libraries (${target} ${mode} ${OPENSSL_LDFLAGS})

+ if (TARGET libssl)

+ target_link_libraries (${target} ${mode} libssl)

+ else ()

+ target_link_libraries (${target} ${mode} ${OPENSSL_LDFLAGS})

+ endif ()

 endif ()

endmacro ()

Proxy Information
Original URL
gemini://git.skyjake.fi/the_Foundation/main/pcdiff/2a58d7db884509dde552db8f9f578b854cf98daf
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
34.229174 milliseconds
Gemini-to-HTML Time
1.110821 milliseconds

This content has been proxied by September (3851b).