Skip to content

Commit a4f711b

Browse files
committed
fix(ci): macOS deployment target for jthread, Windows vcpkg cmake
- macOS: Set MACOSX_DEPLOYMENT_TARGET=11.0 to enable std::jthread (libc++ requires macOS 11+ for LLVM 11 sync primitives) - Windows MSVC: Use --cmake-prefix-path for vcpkg sqlite3 detection - Windows MSVC: Add unofficial-sqlite3 cmake module lookup (vcpkg naming) - Windows MSVC: Add vcpkg bin to PATH for test DLL resolution
1 parent d402ae8 commit a4f711b

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,18 @@ jobs:
150150
brew install meson ninja pkg-config sqlite
151151
152152
- name: Configure
153+
env:
154+
# macOS 11.0+ required for std::jthread (libc++ LLVM 11 sync primitives)
155+
MACOSX_DEPLOYMENT_TARGET: '11.0'
153156
run: |
154157
meson setup build \
155158
-Dbuildtype=debugoptimized \
156159
-Denable_simd_avx=false \
157160
-Denable_simd_neon=true
158161
159162
- name: Build
163+
env:
164+
MACOSX_DEPLOYMENT_TARGET: '11.0'
160165
run: meson compile -C build
161166

162167
- name: Test
@@ -185,17 +190,21 @@ jobs:
185190
C:\vcpkg\vcpkg install sqlite3:x64-windows
186191
187192
- name: Configure
193+
env:
194+
CMAKE_PREFIX_PATH: C:\vcpkg\installed\x64-windows
188195
run: |
189196
meson setup build `
190197
-Dbuildtype=debugoptimized `
191198
-Denable_simd_avx=false `
192199
-Denable_simd_neon=false `
193-
--pkg-config-path=C:\vcpkg\installed\x64-windows\lib\pkgconfig
200+
--cmake-prefix-path=C:\vcpkg\installed\x64-windows
194201
195202
- name: Build
196203
run: meson compile -C build
197204

198205
- name: Test
206+
env:
207+
PATH: C:\vcpkg\installed\x64-windows\bin;${{ env.PATH }}
199208
run: meson test -C build
200209

201210
# =============================================================================

meson.build

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,20 @@ endif
199199

200200
# SQLite3 dependency
201201
# Try multiple methods to find SQLite3:
202-
# 1. pkg-config (Unix-y systems)
203-
# 2. cmake (Windows with vcpkg, some Unix systems)
204-
# 3. system (fallback)
202+
# 1. pkg-config (Unix-y systems, MinGW)
203+
# 2. cmake with unofficial-sqlite3 (vcpkg on Windows)
204+
# 3. cmake with sqlite3 (some systems)
205+
# 4. system (fallback - lets meson try everything)
205206
sqlite3_dep = dependency('sqlite3', version: '>=3.38.0', required: false, method: 'pkg-config')
207+
if not sqlite3_dep.found()
208+
# vcpkg uses 'unofficial-sqlite3' as the cmake package name
209+
sqlite3_dep = dependency('unofficial-sqlite3', required: false, method: 'cmake', modules: ['unofficial::sqlite3::sqlite3'])
210+
endif
206211
if not sqlite3_dep.found()
207212
sqlite3_dep = dependency('sqlite3', version: '>=3.38.0', required: false, method: 'cmake')
208213
endif
209214
if not sqlite3_dep.found()
215+
# Final fallback - let meson try all methods
210216
sqlite3_dep = dependency('sqlite3', version: '>=3.38.0', required: true)
211217
endif
212218

0 commit comments

Comments
 (0)