mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
Merge bitcoin/bitcoin#34848: cmake: Migrate away from deprecated SQLite3 target
498b6eb6b5cmake: Migrate away from deprecated SQLite3 target (Daniel Pfeifer) Pull request description: CMake version 4.3 deprecated the imported target `Sqlite::Sqlite3`. Use the preferred name `Sqlite3::Sqlite3` instead and provide an alias for older versions of CMake. Also define the same alias when using vcpkg. ACKs for top commit: hebasto: ACK498b6eb6b5, tested on Fedora 43 using CMake 3.22.6 and 4.3.0. Tree-SHA512: 8ec0e9673ea39c4383d2995d804498675f9bcd1196ec586f338cb3fa63aa632f160dd179bda3c2d70d932d8b1ac821c15d8247e7302465420937c9227f1bf20a
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user