mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 03:25:50 +00:00
build: fix Windows cmake example failures
The cmake examples were failing at runtime on Windows CI for two reasons. The static library was installed as "libghostty-vt.a" on all platforms, but on Windows the DLL import library is also placed in zig-out/lib/ as "ghostty-vt.lib". The CMakeLists.txt expected the platform-native name "ghostty-vt.lib" for the static lib, so it picked up the tiny DLL import lib instead, silently producing a dynamically-linked executable. That executable then failed at runtime because the DLL was not on PATH. Fix this by installing the static library as "ghostty-vt-static.lib" on Windows to avoid the name collision, and updating CMakeLists.txt to match. For the shared (DLL) example, add zig-out/bin to PATH in the CI run step so the DLL can be found at runtime.
This commit is contained in:
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -294,6 +294,7 @@ jobs:
|
||||
$name = "${{ matrix.dir }}" -replace '-','_'
|
||||
$exe = "example/${{ matrix.dir }}/build/Debug/${name}.exe"
|
||||
if (!(Test-Path $exe)) { $exe = "example/${{ matrix.dir }}/build/${name}.exe" }
|
||||
$env:PATH = "${{ github.workspace }}/zig-out/bin;$env:PATH"
|
||||
& $exe
|
||||
|
||||
build-cmake:
|
||||
|
||||
Reference in New Issue
Block a user