diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cbb391..83fb58b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/cmake/VixConfig.cmake.in b/cmake/VixConfig.cmake.in index 925ed9e..cf7eca4 100644 --- a/cmake/VixConfig.cmake.in +++ b/cmake/VixConfig.cmake.in @@ -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()