1From 6bdcf53de74ac2afba42deea63522939ca51f871 Mon Sep 17 00:00:00 2001
2From: Raphael Robatsch <raphael-git@tapesoftware.net>
3Date: Mon, 25 Dec 2023 16:15:29 +0000
4Subject: [PATCH] Do not forcibly set OPENSSL_ROOT_DIR.
5
6CMake can already find OpenSSL via pkg-config. Setting OPENSSL_ROOT_DIR
7forcibly to "/usr" breaks this.
8---
9 CMakeLists.txt | 9 ---------
10 1 file changed, 9 deletions(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index 0564bc8e..7b4c7f47 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -144,15 +144,6 @@ include(.CMake/compiler_opts.cmake)
17 include(.CMake/alg_support.cmake)
18
19 if(${OQS_USE_OPENSSL})
20- if(NOT DEFINED OPENSSL_ROOT_DIR)
21- if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
22- if(EXISTS "/usr/local/opt/openssl@1.1")
23- set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl@1.1")
24- elseif(EXISTS "/opt/homebrew/opt/openssl@1.1")
25- set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/openssl@1.1")
26- endif()
27- endif()
28- endif()
29 find_package(OpenSSL 1.1.1 REQUIRED)
30
31 if(OQS_DLOPEN_OPENSSL)
32
33--
342.42.0
35