@@ -144,6 +144,67 @@ exit /b 0
144144 if errorlevel 1 exit 1
145145exit /b 0
146146
147+ :build_sqlite
148+ if exist sqlite-stamp exit /b 0
149+
150+ set SQLITE_VERSION = " 3510200"
151+
152+ curl -sLo sqlite-amalgamation-%SQLITE_VERSION% .zip ^
153+ https://www.sqlite.org/2026/sqlite-amalgamation-%SQLITE_VERSION% .zip
154+ if errorlevel 1 exit 1
155+
156+ powershell Expand-Archive sqlite-amalgamation-%SQLITE_VERSION% .zip -DestinationPath '.'
157+ if errorlevel 1 exit 1
158+
159+ cd sqlite-amalgamation-%SQLITE_VERSION%
160+ if errorlevel 1 exit 1
161+
162+ REM Create a minimal CMakeLists.txt
163+ (
164+ echo cmake_minimum_required(VERSION 3.10^ )
165+ echo project(sqlite3 C^ )
166+ echo add_library(sqlite3 STATIC sqlite3.c^ )
167+ 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^ )
168+ echo set_property(TARGET sqlite3 PROPERTY MSVC_RUNTIME_LIBRARY " MultiThreaded$<$<CONFIG:Debug>:Debug>" ^ )
169+ echo install(TARGETS sqlite3 ARCHIVE DESTINATION lib^ )
170+ echo install(FILES sqlite3.h DESTINATION include^ )
171+ ) > CMakeLists.txt
172+
173+ :: build and install
174+ cmake -S . -B build ^
175+ -DCMAKE_INSTALL_PREFIX=%BUILD_PREFIX% /SQLite3
176+ if errorlevel 1 exit 1
177+
178+ cmake --build build --config Release
179+ if errorlevel 1 exit 1
180+
181+ cmake --install build --config Release
182+ if errorlevel 1 exit 1
183+
184+ :: CMake Configfile for ADIOS2 find_package()
185+ REM Create CMake config files
186+ if not exist " %BUILD_PREFIX% \SQLite3\share\cmake\SQLite3" mkdir " %BUILD_PREFIX% \SQLite3\share\cmake\SQLite3"
187+
188+ (
189+ echo set(SQLite3_FOUND TRUE^ )
190+ echo add_library(SQLite::SQLite3 STATIC IMPORTED^ )
191+ echo set_target_properties(SQLite::SQLite3 PROPERTIES
192+ echo IMPORTED_LOCATION " ${CMAKE_CURRENT_LIST_DIR}/../../../lib/sqlite3.lib"
193+ echo INTERFACE_INCLUDE_DIRECTORIES " ${CMAKE_CURRENT_LIST_DIR}/../../../include"
194+ echo ^ )
195+ echo set(SQLite3_INCLUDE_DIRS " ${CMAKE_CURRENT_LIST_DIR}/../../../include" ^ )
196+ echo set(SQLite3_LIBRARIES " ${CMAKE_CURRENT_LIST_DIR}/../../../lib/sqlite3.lib" ^ )
197+ ) > " %INSTALL_DIR% \share\cmake\SQLite3\SQLite3Config.cmake"
198+
199+ :: cleanup
200+ cd ..
201+ rmdir /s /q sqlite-amalgamation-%SQLITE_VERSION%
202+ if errorlevel 1 exit 1
203+
204+ break > sqlite-stamp
205+ if errorlevel 1 exit 1
206+ exit /b 0
207+
147208:build_zfp
148209 if exist zfp-stamp exit /b 0
149210
@@ -209,6 +270,7 @@ exit /b 0
209270:main
210271call :install_buildessentials
211272call :build_zlib
273+ call :build_sqlite
212274:: build_bzip2
213275:: build_szip
214276call :build_zfp
0 commit comments