Ability to turn off linking against OpenSSL if already detected. (#1602)

We already detect OpenSSL in our tree for another project, but don't want to
link httplib against OpenSSL or with SSL support.

Allow us to `set(HTTPLIB_IS_USING_OPENSSL FALSE)`.
This commit is contained in:
Nathan Moinvaziri 2023-06-27 17:09:42 -07:00 committed by GitHub
parent bd9612b81e
commit 18592e7f98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ elseif(HTTPLIB_USE_OPENSSL_IF_AVAILABLE)
find_package(OpenSSL ${_HTTPLIB_OPENSSL_MIN_VER} COMPONENTS Crypto SSL QUIET) find_package(OpenSSL ${_HTTPLIB_OPENSSL_MIN_VER} COMPONENTS Crypto SSL QUIET)
endif() endif()
# Just setting this variable here for people building in-tree # Just setting this variable here for people building in-tree
if(OPENSSL_FOUND) if(OPENSSL_FOUND AND NOT DEFINED HTTPLIB_IS_USING_OPENSSL)
set(HTTPLIB_IS_USING_OPENSSL TRUE) set(HTTPLIB_IS_USING_OPENSSL TRUE)
endif() endif()