mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
cmake: define GHOSTTY_STATIC for static library consumers
The ghostty-vt-static target needs to propagate GHOSTTY_STATIC to consumers so that GHOSTTY_EXPORT resolves to nothing instead of __declspec(dllimport) on Windows. Without this, static linking fails with unresolved __imp_ghostty_* symbols.
This commit is contained in:
@@ -164,6 +164,7 @@ add_library(ghostty-vt-static STATIC IMPORTED GLOBAL)
|
||||
set_target_properties(ghostty-vt-static PROPERTIES
|
||||
IMPORTED_LOCATION "${GHOSTTY_VT_STATIC_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${ZIG_OUT_DIR}/include"
|
||||
INTERFACE_COMPILE_DEFINITIONS "GHOSTTY_STATIC"
|
||||
)
|
||||
if(WIN32)
|
||||
# On Windows, the Zig standard library uses NT API functions
|
||||
|
||||
Reference in New Issue
Block a user