Skip to content

Commit e3875be

Browse files
LegNeatoclaude
andcommitted
Link Windows system libraries for Rust FFI
The Rust standard library depends on ws2_32 (Windows Sockets), ntdll (NT API), userenv, and bcrypt system libraries. Add these as INTERFACE_LINK_LIBRARIES on Windows so consumers of the spirv-tools-ffi imported target get them linked automatically. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 4108b24 commit e3875be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ if(SPIRV_ENABLE_RUST_TARGET_ENV)
180180
add_library(spirv-tools-ffi STATIC IMPORTED GLOBAL)
181181
add_dependencies(spirv-tools-ffi spirv-tools-ffi-rust)
182182
set_target_properties(spirv-tools-ffi PROPERTIES IMPORTED_LOCATION ${SPIRV_RUST_LIB_PATH})
183+
184+
# On Windows, the Rust standard library requires these system libraries
185+
if(WIN32)
186+
set_target_properties(spirv-tools-ffi PROPERTIES
187+
INTERFACE_LINK_LIBRARIES "ws2_32;ntdll;userenv;bcrypt")
188+
endif()
183189
endif()
184190

185191
option(SPIRV_COLOR_TERMINAL "Enable color terminal output" ON)

0 commit comments

Comments
 (0)