Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---

## [Unreleased]
## [v2.1.17]

### Fixes

- fix(cmake): resolve SQLite target mismatch in exported websocket module
Fixed an issue where `vix::websocket` exposed `SQLite3::SQLite3` but the target was not guaranteed to exist in consumer projects, causing CMake configuration failures.

- fix(config): ensure SQLite dependency is correctly resolved before loading Vix targets
Added proper `find_dependency(SQLite3)` handling in `VixConfig.cmake` to prevent missing target errors during `find_package(Vix)`.

### Improvements

- improve(cmake): normalize SQLite target naming across modules and config
Standardized on `SQLite3::SQLite3` as the canonical target and added compatibility aliases for `SQLite::SQLite3` and `sqlite3`.

- improve(websocket): strengthen SQLite target resolution logic
Enhanced detection and aliasing to support multiple environments (vcpkg, system packages, manual installs).

- improve(dev experience): eliminate common `vix run` configuration failures
Running simple programs no longer fails due to missing transitive dependencies.

### Notes

- This release fixes a critical developer experience issue when using `vix run` with modules that depend on SQLite.
- No breaking changes.

## [v2.1.16]

### Fixes
Expand Down
13 changes: 10 additions & 3 deletions cmake/VixConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,22 @@ endif()
if (@VIX_WITH_SQLITE@)
find_dependency(SQLite3 REQUIRED)

# Normalize to SQLite::SQLite3 because many projects use that name.
# Canonical target expected by exported Vix targets.
if (TARGET SQLite::SQLite3 AND NOT TARGET SQLite3::SQLite3)
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
elseif (TARGET sqlite3 AND NOT TARGET SQLite3::SQLite3)
add_library(SQLite3::SQLite3 ALIAS sqlite3)
endif()

# Optional compatibility alias for projects that use SQLite::SQLite3.
if (TARGET SQLite3::SQLite3 AND NOT TARGET SQLite::SQLite3)
add_library(SQLite::SQLite3 ALIAS SQLite3::SQLite3)
elseif (TARGET sqlite3 AND NOT TARGET SQLite::SQLite3)
add_library(SQLite::SQLite3 ALIAS sqlite3)
endif()

if (NOT TARGET SQLite::SQLite3)
message(FATAL_ERROR "SQLite requested but no usable SQLite target was found (SQLite3::SQLite3 / sqlite3).")
if (NOT TARGET SQLite3::SQLite3)
message(FATAL_ERROR "SQLite requested but no usable SQLite target was found (SQLite3::SQLite3 / SQLite::SQLite3 / sqlite3).")
endif()
endif()

Expand Down
Loading