diff -Naur blender-4.5.2/extern/glog/CMakeLists.txt blender-4.5.2-patched/extern/glog/CMakeLists.txt
--- blender-4.5.2/extern/glog/CMakeLists.txt	2025-08-26 12:29:37.944241200 +0300
+++ blender-4.5.2-patched/extern/glog/CMakeLists.txt	2025-08-26 12:30:15.590812000 +0300
@@ -75,6 +75,7 @@
   list(APPEND INC
     src/windows
   )
+  list(APPEND LIB dbghelp)
   if(MSVC)
     # Suppress warning about google::LogMessageFatal::~LogMessageFatal
     # not returning.
diff -Naur blender-4.5.2/intern/cycles/app/CMakeLists.txt blender-4.5.2-patched/intern/cycles/app/CMakeLists.txt
--- blender-4.5.2/intern/cycles/app/CMakeLists.txt	2025-08-26 12:29:30.844623500 +0300
+++ blender-4.5.2-patched/intern/cycles/app/CMakeLists.txt	2025-08-26 12:30:15.604777500 +0300
@@ -99,7 +99,7 @@
   add_executable(cycles ${SRC} ${INC} ${INC_SYS})
   unset(SRC)
 
-  target_link_libraries(cycles PRIVATE ${LIB})
+  target_link_libraries(cycles PRIVATE ${LIB} version)
 
   if(APPLE)
     if(WITH_CYCLES_STANDALONE_GUI)
diff -Naur blender-4.5.2/intern/cycles/scene/CMakeLists.txt blender-4.5.2-patched/intern/cycles/scene/CMakeLists.txt
--- blender-4.5.2/intern/cycles/scene/CMakeLists.txt	2025-08-26 12:29:30.538824400 +0300
+++ blender-4.5.2-patched/intern/cycles/scene/CMakeLists.txt	2025-08-26 12:30:16.361844000 +0300
@@ -125,7 +125,7 @@
   list(APPEND LIB
     ${OPENCOLORIO_LIBRARIES}
   )
-  if(WIN32 AND NOT USD_OVERRIDE_OPENCOLORIO)
+  if(MSVC AND NOT USD_OVERRIDE_OPENCOLORIO)
     add_definitions(-DOpenColorIO_SKIP_IMPORTS)
   endif()
 endif()
diff -Naur blender-4.5.2/intern/cycles/subd/CMakeLists.txt blender-4.5.2-patched/intern/cycles/subd/CMakeLists.txt
--- blender-4.5.2/intern/cycles/subd/CMakeLists.txt	2025-08-26 12:29:31.660441200 +0300
+++ blender-4.5.2-patched/intern/cycles/subd/CMakeLists.txt	2025-08-26 12:30:15.618776800 +0300
@@ -28,7 +28,7 @@
 )
 
 set(LIB
-
+  ${OPENSUBDIV_LIBRARIES}
 )
 
 include_directories(${INC})
diff -Naur blender-4.5.2/intern/cycles/util/CMakeLists.txt blender-4.5.2-patched/intern/cycles/util/CMakeLists.txt
--- blender-4.5.2/intern/cycles/util/CMakeLists.txt	2025-08-26 12:29:30.477314200 +0300
+++ blender-4.5.2-patched/intern/cycles/util/CMakeLists.txt	2025-08-26 12:30:16.369813200 +0300
@@ -32,6 +32,7 @@
 
 set(LIB
   ${TBB_LIBRARIES}
+  ${OPENIMAGEIO_LIBRARIES}
   ${ZSTD_LIBRARIES}
 )
 
diff -Naur blender-4.5.2/intern/ghost/CMakeLists.txt blender-4.5.2-patched/intern/ghost/CMakeLists.txt
--- blender-4.5.2/intern/ghost/CMakeLists.txt	2025-08-26 12:29:29.782743200 +0300
+++ blender-4.5.2-patched/intern/ghost/CMakeLists.txt	2025-08-26 12:30:16.377841600 +0300
@@ -476,6 +476,7 @@
     intern/GHOST_WindowWin32.hh
     intern/GHOST_Wintab.hh
   )
+  list(APPEND LIB comctl32 shcore dwmapi)
 
   list(APPEND SRC
     intern/GHOST_ContextWGL.cc
@@ -489,6 +490,7 @@
 
       intern/GHOST_ImeWin32.hh
     )
+    list(APPEND LIB imm32)
   endif()
 
   if(WITH_INPUT_NDOF)
diff -Naur blender-4.5.2/source/blender/blenlib/CMakeLists.txt blender-4.5.2-patched/source/blender/blenlib/CMakeLists.txt
--- blender-4.5.2/source/blender/blenlib/CMakeLists.txt	2025-08-26 12:29:43.894577300 +0300
+++ blender-4.5.2-patched/source/blender/blenlib/CMakeLists.txt	2025-08-26 12:30:16.387807500 +0300
@@ -478,6 +478,8 @@
   list(APPEND LIB
     bf_intern_uriconvert
     bf_intern_utfconv
+    version
+    dbghelp
     dxgi
   )
   list(APPEND SRC
diff -Naur blender-4.5.2/source/blender/editors/interface/CMakeLists.txt blender-4.5.2-patched/source/blender/editors/interface/CMakeLists.txt
--- blender-4.5.2/source/blender/editors/interface/CMakeLists.txt	2025-08-26 12:29:43.356441100 +0300
+++ blender-4.5.2-patched/source/blender/editors/interface/CMakeLists.txt	2025-08-26 12:30:16.397841700 +0300
@@ -148,6 +148,10 @@
   add_definitions(-DWITH_PYTHON)
 endif()
 
+if(WITH_TBB)
+  add_definitions(-DWITH_TBB)
+endif()
+
 if(WITH_INPUT_IME)
   add_definitions(-DWITH_INPUT_IME)
 endif()
diff -Naur blender-4.5.2/source/blender/editors/space_spreadsheet/CMakeLists.txt blender-4.5.2-patched/source/blender/editors/space_spreadsheet/CMakeLists.txt
--- blender-4.5.2/source/blender/editors/space_spreadsheet/CMakeLists.txt	2025-08-26 12:29:43.558622400 +0300
+++ blender-4.5.2-patched/source/blender/editors/space_spreadsheet/CMakeLists.txt	2025-08-26 12:30:16.413804300 +0300
@@ -70,6 +70,10 @@
   add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS})
 endif()
 
+if(WITH_TBB)
+  add_definitions(-DWITH_TBB)
+endif()
+
 blender_add_lib(bf_editor_space_spreadsheet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
 
 # RNA_prototypes.hh dna_type_offsets.h
diff -Naur blender-4.5.2/source/blender/python/generic/CMakeLists.txt blender-4.5.2-patched/source/blender/python/generic/CMakeLists.txt
--- blender-4.5.2/source/blender/python/generic/CMakeLists.txt	2025-08-26 12:29:41.148880300 +0300
+++ blender-4.5.2-patched/source/blender/python/generic/CMakeLists.txt	2025-08-26 12:30:16.419805200 +0300
@@ -37,6 +37,7 @@
 )
 
 set(LIB
+  ${OPENGL_gl_LIBRARY}
   ${PYTHON_LINKFLAGS}
   ${PYTHON_LIBRARIES}
   PRIVATE bf::blenkernel
diff -Naur blender-4.5.2/source/blender/render/CMakeLists.txt blender-4.5.2-patched/source/blender/render/CMakeLists.txt
--- blender-4.5.2/source/blender/render/CMakeLists.txt	2025-08-26 12:29:40.296788000 +0300
+++ blender-4.5.2-patched/source/blender/render/CMakeLists.txt	2025-08-26 12:30:16.426811100 +0300
@@ -95,6 +95,12 @@
   add_definitions(-DWITH_FREESTYLE)
 endif()
 
+if(WITH_OPENCOLORIO)
+  list(APPEND LIB
+    ${OPENCOLORIO_LIBRARIES}
+  )
+endif()
+
 if(WITH_HYDRA)
   add_subdirectory(hydra)
 endif()
diff -Naur blender-4.5.2/source/creator/CMakeLists.txt blender-4.5.2-patched/source/creator/CMakeLists.txt
--- blender-4.5.2/source/creator/CMakeLists.txt	2025-08-26 12:29:39.688498800 +0300
+++ blender-4.5.2-patched/source/creator/CMakeLists.txt	2025-08-26 12:30:16.435811600 +0300
@@ -353,6 +353,9 @@
         ${CMAKE_SOURCE_DIR}/release/windows/icons/blender.exe.manifest
       )
     endif()
+    if(MINGW)
+      target_link_options(blender-launcher PRIVATE "-municode")
+    endif()
     target_compile_definitions(blender-launcher PRIVATE -D_UNICODE -DUNICODE)
     target_link_libraries(blender-launcher pathcch)
   endif()
