From d204fadf001146adfd8c5d420b7640be7477117e Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 9 Mar 2026 19:31:09 -0600 Subject: [PATCH] CMake: Link Rust stdlib dependencies on Windows --- cmake/nodConfig.cmake.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/nodConfig.cmake.in b/cmake/nodConfig.cmake.in index 4767d98..0969382 100644 --- a/cmake/nodConfig.cmake.in +++ b/cmake/nodConfig.cmake.in @@ -43,6 +43,11 @@ if (NOT TARGET nod::nod_shared AND NOT TARGET nod::nod_static) IMPORTED_LOCATION "${_nod_static}" 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() # Default nod::nod target (respects BUILD_SHARED_LIBS)