Browse Source

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)`.
Nathan Moinvaziri 2 years ago
parent
commit
18592e7f98
1 changed files with 1 additions and 1 deletions
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -120,7 +120,7 @@ elseif(HTTPLIB_USE_OPENSSL_IF_AVAILABLE)
 	find_package(OpenSSL ${_HTTPLIB_OPENSSL_MIN_VER} COMPONENTS Crypto SSL QUIET)
 endif()
 # 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)
 endif()