From c3621f4c38f66cebf998c8a5adba861a28fa8f38 Mon Sep 17 00:00:00 2001 From: Ivan Zhakov Date: Sat, 14 Sep 2024 19:03:51 +0000 Subject: [PATCH] CMake: Use imported targets for OpenSSL. git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920657 13f79535-47bb-0310-9956-ffa450edef68 --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e370588d..9a9d91d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,8 +273,7 @@ IF(NOT APU_DSO_BUILD AND APU_HAVE_CRYPTO) ENDIF() LIST(APPEND APU_EXTRA_SOURCES crypto/apr_crypto_openssl.c) - LIST(APPEND APU_EXTRA_LIBRARIES ${OPENSSL_LIBRARIES}) - LIST(APPEND APU_EXTRA_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + LIST(APPEND APU_EXTRA_LIBRARIES OpenSSL::Crypto) ENDIF() IF(NOT APU_DSO_BUILD AND APU_HAVE_ODBC) @@ -333,12 +332,10 @@ IF(APU_DSO_BUILD AND APU_HAVE_CRYPTO) ADD_LIBRARY(apr_crypto_openssl-1 SHARED crypto/apr_crypto_openssl.c libaprutil.rc) LIST(APPEND install_targets apr_crypto_openssl-1) LIST(APPEND install_bin_pdb $) - TARGET_INCLUDE_DIRECTORIES(apr_crypto_openssl-1 - PRIVATE "${OPENSSL_INCLUDE_DIR}") TARGET_COMPILE_DEFINITIONS(apr_crypto_openssl-1 PRIVATE "DLL_NAME=apr_crypto_openssl") TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 - PRIVATE libaprutil-1 apr::libapr-1 ${OPENSSL_LIBRARIES}) + PRIVATE libaprutil-1 apr::libapr-1 OpenSSL::Crypto) ENDIF() IF(APU_DSO_BUILD AND APU_HAVE_ODBC)