diff --git a/.gitignore b/.gitignore index b2ff56c..fc072a4 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ hello_server # Keep only CMake package config template cmake/* !cmake/VixConfig.cmake.in +!cmake/VixVendoredDeps.cmake *.bak db.sql revoir.md diff --git a/cmake/VixVendoredDeps.cmake b/cmake/VixVendoredDeps.cmake new file mode 100644 index 0000000..941f072 --- /dev/null +++ b/cmake/VixVendoredDeps.cmake @@ -0,0 +1,31 @@ +# Vendored deps for restricted environments (no git, no system packages) +message(STATUS "[deps] Loading VixVendoredDeps.cmake from: ${CMAKE_CURRENT_LIST_FILE}") + + +# spdlog (header-only) — as IMPORTED INTERFACE so it doesn't need export +if (EXISTS "${CMAKE_SOURCE_DIR}/third_party/spdlog/include/spdlog/spdlog.h") + if (NOT TARGET spdlog::spdlog_header_only) + add_library(spdlog::spdlog_header_only INTERFACE IMPORTED) + set_target_properties(spdlog::spdlog_header_only PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/third_party/spdlog/include" + ) + message(STATUS "[deps] Using vendored spdlog header-only (third_party/spdlog)") + endif() +endif() + +# SQLite3 (vendored amalgamation) — OBJECT lib (no export) +if (EXISTS "${CMAKE_SOURCE_DIR}/third_party/sqlite/amalgamation/sqlite3.c") + if (NOT TARGET vix_sqlite3_obj) + add_library(vix_sqlite3_obj OBJECT + "${CMAKE_SOURCE_DIR}/third_party/sqlite/amalgamation/sqlite3.c" + ) + set_target_properties(vix_sqlite3_obj PROPERTIES + LINKER_LANGUAGE C + ) + target_include_directories(vix_sqlite3_obj PUBLIC + "${CMAKE_SOURCE_DIR}/third_party/sqlite/amalgamation" + ) + message(STATUS "[deps] Using vendored SQLite3 amalgamation (third_party/sqlite)") + endif() +endif() + diff --git a/modules/cli b/modules/cli index 4a3bbf4..d7a5969 160000 --- a/modules/cli +++ b/modules/cli @@ -1 +1 @@ -Subproject commit 4a3bbf40f3b7206309c2cc05915dfa008f5bcee1 +Subproject commit d7a5969e5f75bf436c87ee445d7f179710e36596