@@ -321,6 +321,14 @@ namespace vix::commands::BuildCommand
321321 }
322322 o.preset = std::string (*v);
323323 }
324+ else if (a == " --with-sqlite" )
325+ {
326+ o.withSqlite = true ;
327+ }
328+ else if (a == " --with-mysql" )
329+ {
330+ o.withMySql = true ;
331+ }
324332 else if (a.rfind (" --preset=" , 0 ) == 0 )
325333 {
326334 o.preset = a.substr (std::string (" --preset=" ).size ());
@@ -724,6 +732,20 @@ namespace vix::commands::BuildCommand
724732 vars.emplace_back (" CMAKE_MODULE_LINKER_FLAGS" , *fastLinkerFlag);
725733 }
726734
735+ if (opt.withSqlite )
736+ {
737+ vars.emplace_back (" VIX_ENABLE_DB" , " ON" );
738+ vars.emplace_back (" VIX_DB_USE_SQLITE" , " ON" );
739+ vars.emplace_back (" VIX_DB_REQUIRE_SQLITE" , " ON" );
740+ }
741+
742+ if (opt.withMySql )
743+ {
744+ vars.emplace_back (" VIX_ENABLE_DB" , " ON" );
745+ vars.emplace_back (" VIX_DB_USE_MYSQL" , " ON" );
746+ vars.emplace_back (" VIX_DB_REQUIRE_MYSQL" , " ON" );
747+ }
748+
727749 std::sort (
728750 vars.begin (),
729751 vars.end (),
@@ -1257,6 +1279,8 @@ namespace vix::commands::BuildCommand
12571279 out << " --target <triple> Cross-compilation target triple (auto toolchain)\n " ;
12581280 out << " --sysroot <path> Sysroot for cross toolchain (optional)\n " ;
12591281 out << " --static Request static linking (VIX_LINK_STATIC=ON)\n " ;
1282+ out << " --with-sqlite Enable SQLite support (VIX_DB_USE_SQLITE=ON)\n " ;
1283+ out << " --with-mysql Enable MySQL support (VIX_DB_USE_MYSQL=ON)\n " ;
12601284 out << " -j, --jobs <n> Parallel build jobs (default: CPU count, clamped)\n " ;
12611285 out << " --clean Remove local build directories and reconfigure from scratch\n " ;
12621286 out << " --no-cache Disable signature cache shortcut\n " ;
@@ -1279,6 +1303,10 @@ namespace vix::commands::BuildCommand
12791303
12801304 out << " Examples:\n " ;
12811305 out << " vix build\n " ;
1306+ out << " vix build --with-sqlite\n " ;
1307+ out << " vix build --with-mysql\n " ;
1308+ out << " vix build --preset release --with-sqlite\n " ;
1309+ out << " vix build --preset dev-ninja --with-mysql\n " ;
12821310 out << " vix build --verbose\n " ;
12831311 out << " vix build --fast\n " ;
12841312 out << " vix build --preset release\n " ;
0 commit comments