From f5b58cb4bad86d5cd51c0477a282c335df801b9d Mon Sep 17 00:00:00 2001 From: Bryce Mecum Date: Fri, 17 Apr 2026 09:11:32 -0700 Subject: [PATCH] update target, add alias --- c/driver/sqlite/CMakeLists.txt | 7 ++++++- c/integration/static_test/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/c/driver/sqlite/CMakeLists.txt b/c/driver/sqlite/CMakeLists.txt index 87ad731b09..c67b30201f 100644 --- a/c/driver/sqlite/CMakeLists.txt +++ b/c/driver/sqlite/CMakeLists.txt @@ -17,7 +17,12 @@ find_package(SQLite3) if(SQLite3_FOUND) - set(SQLite3_LINK_LIBRARIES SQLite::SQLite3) + # SQLite::SQLite3 is deprecated in newer cmake. Alias to support CMake < 4.3. + # See https://cmake.org/cmake/help/latest/module/FindSQLite3.html. + if(NOT TARGET SQLite3::SQLite3) + add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3) + endif() + set(SQLite3_LINK_LIBRARIES SQLite3::SQLite3) else() # vcpkg find_package(unofficial-sqlite3 CONFIG REQUIRED) diff --git a/c/integration/static_test/CMakeLists.txt b/c/integration/static_test/CMakeLists.txt index e0ada2fe70..9b2b7fb449 100644 --- a/c/integration/static_test/CMakeLists.txt +++ b/c/integration/static_test/CMakeLists.txt @@ -42,7 +42,7 @@ target_link_libraries(static_test AdbcDriverPostgreSQL::adbc_driver_postgresql_static AdbcDriverSQLite::adbc_driver_sqlite_static PostgreSQL::PostgreSQL - SQLite::SQLite3 + SQLite3::SQLite3 fmt::fmt nanoarrow::nanoarrow AdbcDriverCommon::adbc_driver_common