build: make sure CMake can clean up after libghostty-vt (#11845)

Fixes `cmake --build build --target clean`

Currently:

```
[1/1] Cleaning all built files...
FAILED: clean
ninja  -t clean
Cleaning... ninja: error: remove(_deps/ghostty-src/zig-out/lib): Directory not empty
ninja: error: remove(/...ghostling/build/_deps/ghostty-src/zig-out/lib): Directory not empty
33 files.
ninja: build stopped: subcommand failed.
```
This commit is contained in:
Mitchell Hashimoto
2026-03-25 13:00:42 -07:00
committed by GitHub

View File

@@ -121,6 +121,11 @@ add_custom_target(zig_build_lib_vt ALL
DEPENDS "${GHOSTTY_VT_SHARED_LIBRARY}" "${GHOSTTY_VT_STATIC_LIBRARY}"
)
# Tell CMake's clean target to also remove Zig's output directory.
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_CLEAN_FILES "${ZIG_OUT_DIR}"
)
# --- IMPORTED library targets ------------------------------------------------
# Shared