CMake: Link Rust stdlib dependencies on Windows

This commit is contained in:
Luke Street
2026-03-09 19:31:09 -06:00
parent 137d21673a
commit d204fadf00
+5
View File
@@ -43,6 +43,11 @@ if (NOT TARGET nod::nod_shared AND NOT TARGET nod::nod_static)
IMPORTED_LOCATION "${_nod_static}" IMPORTED_LOCATION "${_nod_static}"
INTERFACE_INCLUDE_DIRECTORIES "${_nod_incdir}" INTERFACE_INCLUDE_DIRECTORIES "${_nod_incdir}"
) )
# Rust's std library requires these system libraries when linked statically
if (WIN32)
set_property(TARGET nod::nod_static APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ntdll userenv ws2_32 dbghelp bcrypt)
endif()
endif() endif()
# Default nod::nod target (respects BUILD_SHARED_LIBS) # Default nod::nod target (respects BUILD_SHARED_LIBS)