From 052a30b778a73acec6b77b5563f76fad7c39b249 Mon Sep 17 00:00:00 2001 From: Ivan Zhakov Date: Sat, 14 Sep 2024 19:05:27 +0000 Subject: [PATCH] CMake: Use imported targets for SQLite3. git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920658 13f79535-47bb-0310-9956-ffa450edef68 --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a9d91d1..1c2e21b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,7 +287,7 @@ IF(NOT APU_DSO_BUILD AND APU_HAVE_SQLITE3) LIST(APPEND dbd_drivers sqlite3) LIST(APPEND APU_EXTRA_SOURCES dbd/apr_dbd_sqlite3.c) - LIST(APPEND APU_EXTRA_LIBRARIES ${SQLite3_LIBRARIES}) + LIST(APPEND APU_EXTRA_LIBRARIES SQLite::SQLite3) ENDIF() ADD_LIBRARY(libaprutil-1 ${APR_SOURCES} ${APU_EXTRA_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) @@ -368,10 +368,9 @@ IF(APU_DSO_BUILD AND APU_HAVE_SQLITE3) LIST(APPEND install_targets apr_dbd_sqlite3-1) LIST(APPEND install_bin_pdb $) LIST(APPEND dbd_drivers sqlite3) - TARGET_INCLUDE_DIRECTORIES(apr_dbd_sqlite3-1 - PRIVATE "${SQLite3_INCLUDE_DIRS}") + TARGET_INCLUDE_DIRECTORIES(apr_dbd_sqlite3-1) TARGET_LINK_LIBRARIES(apr_dbd_sqlite3-1 - PRIVATE libaprutil-1 apr::libapr-1 ${SQLite3_LIBRARIES}) + PRIVATE libaprutil-1 apr::libapr-1 SQLite::SQLite3) TARGET_COMPILE_DEFINITIONS(apr_dbd_sqlite3-1 PRIVATE "DLL_NAME=apr_dbd_sqlite3-1") ENDIF()