Skip to content

Commit

Permalink
CMake: Use imported targets for OpenSSL.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920657 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 14, 2024
1 parent 881cfbf commit c3621f4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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_PDB_FILE:apr_crypto_openssl-1>)
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)
Expand Down

0 comments on commit c3621f4

Please sign in to comment.