diff --git a/cmake/FDBComponents.cmake b/cmake/FDBComponents.cmake index 3ae609ee67..ec26c07dd8 100644 --- a/cmake/FDBComponents.cmake +++ b/cmake/FDBComponents.cmake @@ -22,14 +22,14 @@ else() find_package(OpenSSL) if(OPENSSL_FOUND) set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + set(WITH_TLS ON) + add_compile_options(-DHAVE_OPENSSL) check_symbol_exists("OPENSSL_INIT_NO_ATEXIT" "openssl/crypto.h" OPENSSL_HAS_NO_ATEXIT) if(OPENSSL_HAS_NO_ATEXIT) add_compile_options(-DHAVE_OPENSSL_INIT_NO_AT_EXIT) else() message(STATUS "Found OpenSSL without OPENSSL_INIT_NO_ATEXIT: assuming BoringSSL") endif() - set(WITH_TLS ON) - add_compile_options(-DHAVE_OPENSSL) else() message(STATUS "OpenSSL was not found - Will compile without TLS Support") message(STATUS "You can set OPENSSL_ROOT_DIR to help cmake find it")