From b91c1fc3a9cb140780054749fdfbc2d5ec764b89 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 14 May 2026 11:28:39 -0400 Subject: [PATCH] PellesC: Pass common Windows SDK libraries to linker by default We already do this for MSVC and MinGW. The linker ignores them if no symbols are needed. Issue: #21536 Co-authored-by: Serguei E. Leontiev --- Modules/Platform/Windows-PellesC-C.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/Platform/Windows-PellesC-C.cmake b/Modules/Platform/Windows-PellesC-C.cmake index e57ae7a141..aca8e65200 100644 --- a/Modules/Platform/Windows-PellesC-C.cmake +++ b/Modules/Platform/Windows-PellesC-C.cmake @@ -35,6 +35,8 @@ string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -Ot -Ob2 -DNDEBUG=1") string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -Zi -Ot -Ob1 -DNDEBUG=1") string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Os -Ob1 -DNDEBUG=1") +set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib") + unset(_PellesC_C_OBJ_FLAGS) unset(_PellesC_C_ASM_FLAGS) unset(_PellesC_ARCH)