From: Martin Matuska Date: Fri, 14 Jul 2023 08:04:37 +0000 (+0200) Subject: build: fix cmake build with OpenSSL X-Git-Tag: v3.7.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3d16ec25d695b186c25f31b6bab1c4401122a3e;p=thirdparty%2Flibarchive.git build: fix cmake build with OpenSSL --- 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