From d3d16ec25d695b186c25f31b6bab1c4401122a3e Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Fri, 14 Jul 2023 10:04:37 +0200 Subject: [PATCH] build: fix cmake build with OpenSSL --- CMakeLists.txt | 4 ++++ build/cmake/config.h.in | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b9faee4a..d2315adbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -826,6 +826,10 @@ IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") SET(HAVE_LIBCRYPTO 1) INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY}) + SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + LA_CHECK_INCLUDE_FILE("openssl/evp.h" HAVE_OPENSSL_EVP_H) + CHECK_FUNCTION_EXISTS(PKCS5_PBKDF2_HMAC_SHA1 HAVE_PKCS5_PBKDF2_HMAC_SHA1) ENDIF(OPENSSL_FOUND) ELSE() SET(OPENSSL_FOUND FALSE) # Override cached value diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in index 11b512d91..204660971 100644 --- a/build/cmake/config.h.in +++ b/build/cmake/config.h.in @@ -908,6 +908,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `openat' function. */ #cmakedefine HAVE_OPENAT 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_OPENSSL_EVP_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_PATHS_H 1 -- 2.47.2