@@ -42,7 +42,8 @@ exit /b 0
4242 -DADIOS2_USE_Python=OFF ^
4343 -DADIOS2_USE_ZeroMQ=OFF ^
4444 -DADIOS2_USE_ZFP=ON ^
45- -DADIOS2_RUN_INSTALL_TEST=OFF
45+ -DADIOS2_RUN_INSTALL_TEST=OFF ^
46+ -DSQLite3_ROOT=%BUILD_PREFIX% /SQLite3
4647 if errorlevel 1 exit 1
4748:: TODO: Could NOT find HDF5 (missing: HDF5_LIBRARIES C)
4849:: -DADIOS2_USE_HDF5=ON
@@ -144,6 +145,52 @@ exit /b 0
144145 if errorlevel 1 exit 1
145146exit /b 0
146147
148+ :build_sqlite
149+ if exist sqlite-stamp exit /b 0
150+
151+ set SQLITE_VERSION = " 3510200"
152+
153+ curl -sLo sqlite-amalgamation-%SQLITE_VERSION% .zip ^
154+ https://www.sqlite.org/2026/sqlite-amalgamation-%SQLITE_VERSION% .zip
155+ if errorlevel 1 exit 1
156+
157+ powershell Expand-Archive sqlite-amalgamation-%SQLITE_VERSION% .zip -DestinationPath '.'
158+ if errorlevel 1 exit 1
159+
160+ cd sqlite-amalgamation-%SQLITE_VERSION%
161+ if errorlevel 1 exit 1
162+
163+ REM Create a minimal CMakeLists.txt
164+ (
165+ echo cmake_minimum_required(VERSION 3.10^ )
166+ echo project(sqlite3 C^ )
167+ echo add_library(sqlite3 STATIC sqlite3.c^ )
168+ echo target_compile_definitions(sqlite3 PRIVATE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS5 SQLITE_ENABLE_RTREE SQLITE_ENABLE_DBSTAT_VTAB SQLITE_ENABLE_RBU SQLITE_ENABLE_SESSION^ )
169+ echo set_property(TARGET sqlite3 PROPERTY MSVC_RUNTIME_LIBRARY " MultiThreaded$<$<CONFIG:Debug>:Debug>" ^ )
170+ echo install(TARGETS sqlite3 ARCHIVE DESTINATION lib^ )
171+ echo install(FILES sqlite3.h DESTINATION include^ )
172+ ) > CMakeLists.txt
173+
174+ :: build and install
175+ cmake -S . -B build ^
176+ -DCMAKE_INSTALL_PREFIX=%BUILD_PREFIX% /SQLite3
177+ if errorlevel 1 exit 1
178+
179+ cmake --build build --config Release
180+ if errorlevel 1 exit 1
181+
182+ cmake --install build --config Release
183+ if errorlevel 1 exit 1
184+
185+ :: cleanup
186+ cd ..
187+ rmdir /s /q sqlite-amalgamation-%SQLITE_VERSION%
188+ if errorlevel 1 exit 1
189+
190+ break > sqlite-stamp
191+ if errorlevel 1 exit 1
192+ exit /b 0
193+
147194:build_zfp
148195 if exist zfp-stamp exit /b 0
149196
@@ -209,6 +256,7 @@ exit /b 0
209256:main
210257call :install_buildessentials
211258call :build_zlib
259+ call :build_sqlite
212260:: build_bzip2
213261:: build_szip
214262call :build_zfp
0 commit comments