18 lines
1.0 KiB
CMake
18 lines
1.0 KiB
CMake
# Stock `x64-windows-static-md` (SQLite linked statically against the DYNAMIC CRT — the CRT the
|
|||
|
|
# Swift toolchain uses) PLUS `SQLITE_ENABLE_SNAPSHOT`.
|
||
|
|
#
|
||
|
|
# GRDB's system-SQLite path compiles `WALSnapshot.swift` and `DatabaseSnapshotPool.swift`
|
||
|
|
# unconditionally, i.e. it assumes the platform SQLite exposes `sqlite3_snapshot_*`. That holds
|
||
|
|
# for Apple's system SQLite and for typical Linux distro builds, but the vcpkg port ships stock
|
||
|
|
# defaults, where the snapshot API is compiled out — so the Windows link fails with four
|
||
|
|
# undefined symbols (`sqlite3_snapshot_open/get/free/cmp`) long after the library itself resolves.
|
||
|
|
#
|
||
|
|
# Used via `--overlay-triplets=windows/vcpkg-triplets` (windows/build.ps1, windows.yml). The
|
||
|
|
# `-nucleic` suffix keeps this tree from colliding with a stock `x64-windows-static-md` install
|
||
|
|
# in the same vcpkg root.
|
||
|
|
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||
|
|
set(VCPKG_CRT_LINKAGE dynamic)
|
||
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
||
|
|
set(VCPKG_C_FLAGS "/DSQLITE_ENABLE_SNAPSHOT")
|
||
|
|
set(VCPKG_CXX_FLAGS "/DSQLITE_ENABLE_SNAPSHOT")
|