From 05728681a5522f8fd04cbf9ae740f1fa1e9a6a46 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 15 Oct 2014 09:49:03 -0700 Subject: [PATCH] add a check to warn if OpenSSL is OS X system version --- domain-server/CMakeLists.txt | 6 ++++++ libraries/networking/CMakeLists.txt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index 24cb6e3fdc..9090a1b637 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -41,6 +41,12 @@ link_hifi_libraries(embedded-webserver networking shared) # find OpenSSL find_package(OpenSSL REQUIRED) +if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include") + # this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto + message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings." + "\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.") +endif () + include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") # append OpenSSL to our list of libraries to link diff --git a/libraries/networking/CMakeLists.txt b/libraries/networking/CMakeLists.txt index b86f53105c..e4dd37234b 100644 --- a/libraries/networking/CMakeLists.txt +++ b/libraries/networking/CMakeLists.txt @@ -13,6 +13,12 @@ endif () # find OpenSSL find_package(OpenSSL REQUIRED) +if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include") + # this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto + message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings." + "\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.") +endif () + include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") # append OpenSSL to our list of libraries to link