From 789e6204515999c08ebe2aaccc90a5dceccd0ca2 Mon Sep 17 00:00:00 2001 From: flagarde Date: Fri, 15 May 2020 23:40:47 +0800 Subject: [PATCH] Update CMakeLists.txt just have to provide OPENSSL_ROOT_DIR to cmake --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37f89bd5..7552d5b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,10 +180,8 @@ if (USE_TLS) # set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /opt/local/include/openssl-1.0) endif() - # This OPENSSL_FOUND check is to help find a cmake manually configured OpenSSL - if (NOT OPENSSL_FOUND) - find_package(OpenSSL REQUIRED) - endif() + # Use OPENSSL_ROOT_DIR CMake variable if you need to use your own openssl + find_package(OpenSSL REQUIRED) message(STATUS "OpenSSL: " ${OPENSSL_VERSION}) add_definitions(${OPENSSL_DEFINITIONS})