From 43b990afe61ab0e357afdc650d850cfa65ee5287 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 11 Feb 2022 07:00:30 +0300 Subject: [PATCH] [cmake] disable deprecation warning when OpenSSL 3 is used Signed-off-by: R4SAS --- build/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 2e484ad4..28775347 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -227,6 +227,10 @@ if(NOT DEFINED OPENSSL_INCLUDE_DIR) message(SEND_ERROR "Could not find OpenSSL. Please download and install it first!") endif() +if(OPENSSL_VERSION_MAJOR MATCHES "3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") +endif() + if(WITH_UPNP) find_package(MiniUPnPc REQUIRED) if(NOT MINIUPNPC_FOUND)