--- oqs-provider-0.6.1/CMakeLists.txt.orig	2024-08-15 12:23:38.517050000 +0200
+++ oqs-provider-0.6.1/CMakeLists.txt	2024-08-15 12:23:31.985024900 +0200
@@ -67,6 +67,12 @@
 set(OPENSSL_MODULES_PATH ${OPENSSL_LIB_DIR}/ossl-modules)
 endif()
 
+# Relocate OPENSSL_MODULES_PATH to the install prefix
+cmake_path(GET OPENSSL_CRYPTO_LIBRARY PARENT_PATH OPENSSL_PREFIX)
+cmake_path(GET OPENSSL_PREFIX PARENT_PATH OPENSSL_PREFIX)
+file(RELATIVE_PATH OPENSSL_MODULES_PATH_REL "${OPENSSL_PREFIX}" "${OPENSSL_MODULES_PATH}")
+set(OPENSSL_MODULES_PATH "${CMAKE_INSTALL_PREFIX}/${OPENSSL_MODULES_PATH_REL}")
+
 # Add required include for liboqs
 find_package(liboqs REQUIRED)
 get_target_property(LIBOQS_INCLUDE_DIR OQS::oqs INTERFACE_INCLUDE_DIRECTORIES)
