[Bf-blender-cvs] [bd811e92c13] temp-T97352-3d-texturing-seam-bleeding-b2: Fix: lite build on windows

Ray Molenkamp noreply at git.blender.org
Tue Sep 20 10:32:12 CEST 2022


Commit: bd811e92c13167286d44f1a529c2dcb2fa49ec5c
Author: Ray Molenkamp
Date:   Sat Sep 17 09:36:14 2022 -0600
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rBbd811e92c13167286d44f1a529c2dcb2fa49ec5c

Fix: lite build on windows

writefile.cc includes BLI_winstuff.h which
includes Windows.h which supplies definitions
of min/max that conflict with the c++ headers

previously windows.h was only included when TBB was
enabled, the inclusion of BLI_winstuff.h now
makes this define mandatory for all configurations

===================================================================

M	source/blender/blenloader/CMakeLists.txt

===================================================================

diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index f99fb21e994..bf99ca2cd9a 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -88,11 +88,10 @@ if(WITH_TBB)
     ${TBB_INCLUDE_DIRS}
   )
   add_definitions(-DWITH_TBB)
-  if(WIN32)
-    # TBB includes Windows.h which will define min/max macros
-    # that will collide with the stl versions.
-    add_definitions(-DNOMINMAX)
-  endif()
+endif()
+
+if(WIN32)
+  add_definitions(-DNOMINMAX)
 endif()
 
 blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")



More information about the Bf-blender-cvs mailing list