[sqlite3] Let wrapper handle aliased SQLite::SQLite3 (#51698)

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
This commit is contained in:
Kai Pastor 2026-05-14 00:54:43 +02:00 committed by GitHub
parent aa59a8447e
commit 2f04408a99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 3 deletions

View File

@ -29,15 +29,25 @@ if(SQLite3_FOUND)
list(APPEND SQLite3_LIBRARIES ${z_vcpkg_sqlite3_libraries})
endif()
if(TARGET SQLite::SQLite3)
set_target_properties(SQLite::SQLite3 PROPERTIES INTERFACE_LINK_LIBRARIES "${z_vcpkg_sqlite3_link_libs}")
get_target_property(z_vcpkg_sqlite3_is_alias SQLite::SQLite3 ALIASED_TARGET)
if(NOT z_vcpkg_sqlite3_is_alias)
set_target_properties(SQLite::SQLite3 PROPERTIES INTERFACE_LINK_LIBRARIES "${z_vcpkg_sqlite3_link_libs}")
endif()
unset(z_vcpkg_sqlite3_is_alias)
elseif(TARGET SQLite3::SQLite3)
add_library(SQLite::SQLite3 INTERFACE IMPORTED)
set_target_properties(SQLite::SQLite3 PROPERTIES INTERFACE_LINK_LIBRARIES SQLite3::SQLite3)
endif()
if(TARGET SQLite3::SQLite3)
get_target_property(z_vcpkg_sqlite3_is_alias SQLite3::SQLite3 ALIASED_TARGET)
if(NOT z_vcpkg_sqlite3_is_alias)
set_target_properties(SQLite3::SQLite3 PROPERTIES INTERFACE_LINK_LIBRARIES "${z_vcpkg_sqlite3_link_libs}")
endif()
unset(z_vcpkg_sqlite3_is_alias)
elseif(TARGET SQLite::SQLite3)
add_library(SQLite3::SQLite3 INTERFACE IMPORTED)
set_target_properties(SQLite3::SQLite3 PROPERTIES INTERFACE_LINK_LIBRARIES SQLite::SQLite3)
endif()
unset(z_vcpkg_sqlite3_libraries)
unset(z_vcpkg_sqlite3_link_libs)
endif()

View File

@ -1,7 +1,7 @@
{
"name": "sqlite3",
"version": "3.53.1",
"port-version": 1,
"port-version": 2,
"description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.",
"homepage": "https://sqlite.org/",
"license": "blessing",

View File

@ -9594,7 +9594,7 @@
},
"sqlite3": {
"baseline": "3.53.1",
"port-version": 1
"port-version": 2
},
"sqlitecpp": {
"baseline": "3.3.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "59a23e5083c8966c60eda30bd9a164c959f104ae",
"version": "3.53.1",
"port-version": 2
},
{
"git-tree": "2026ad457a41f41b28699ef66ee4f9431d4a86f1",
"version": "3.53.1",