cmake: Migrate away from deprecated SQLite3 target
What changed, and why it matters
This is a routine build-system cleanup. The developers renamed how their CMake scripts refer to the SQLite database library so they use the current, non-deprecated target name. It does not change Bitcoin Core's behavior, fix a bug, or alter how wallets store data. There is no security relevance in the commit itself.
No security action needed. Treat as normal maintenance; verify CI builds pass after merge if backporting or integrating.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit migrates CMake imported-target references from the deprecated SQLite::SQLite3 (and the vcpkg-specific unofficial::sqlite3::sqlite3) to the canonical SQLite3::SQLite3, adding an alias for older CMake versions and for vcpkg. This is purely a build-system modernization with no functional code changes.
Changed components
CMake build configurationWallet module build configurationInspect captured patch +5 / −2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 518e0277..26e5fede 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,8 +117,12 @@ if(ENABLE_WALLET)
if(VCPKG_TARGET_TRIPLET)
# Use of the `unofficial::` namespace is a vcpkg package manager convention.
find_package(unofficial-sqlite3 CONFIG REQUIRED)
+ add_library(SQLite3::SQLite3 ALIAS unofficial::sqlite3::sqlite3)
else()
find_package(SQLite3 3.7.17 REQUIRED)
+ if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3
+ add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
+ endif()
endif()
endif()
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
index 8ec381df..36fd3ef9 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -38,8 +38,7 @@ target_link_libraries(bitcoin_wallet
PRIVATE
core_interface
bitcoin_common
- $<TARGET_NAME_IF_EXISTS:unofficial::sqlite3::sqlite3>
- $<TARGET_NAME_IF_EXISTS:SQLite::SQLite3>
+ SQLite3::SQLite3
univalue
Boost::headers
$<TARGET_NAME_IF_EXISTS:USDT::headers>
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.