[Bf-blender-cvs] [6ade526] opensubdiv-modifier: OpenSubdiv: Define NOMINMAX on Windows platform
Sergey Sharybin
noreply at git.blender.org
Wed Aug 6 12:25:18 CEST 2014
Commit: 6ade526dbaa708f05639932befe5040d914a6a8d
Author: Sergey Sharybin
Date: Wed Aug 6 16:22:41 2014 +0600
Branches: opensubdiv-modifier
https://developer.blender.org/rB6ade526dbaa708f05639932befe5040d914a6a8d
OpenSubdiv: Define NOMINMAX on Windows platform
This way we can compile with current policy of OpenSubdiv,
this is for at least until this defines are figured out
from the OpenSubdiv side.
===================================================================
M intern/opensubdiv/CMakeLists.txt
M intern/opensubdiv/SConscript
===================================================================
diff --git a/intern/opensubdiv/CMakeLists.txt b/intern/opensubdiv/CMakeLists.txt
index b919dd2..4dde50e 100644
--- a/intern/opensubdiv/CMakeLists.txt
+++ b/intern/opensubdiv/CMakeLists.txt
@@ -57,6 +57,10 @@ data_to_c_simple(gpu_shader_opensubd_display.glsl SRC)
add_definitions(-DGLEW_STATIC)
+if(WIN32)
+ add_definitions(-DNOMINMAX)
+endif()
+
if(OPENSUBDIV_HAS_CUDA)
list(APPEND INC
../../extern/cuew/include
diff --git a/intern/opensubdiv/SConscript b/intern/opensubdiv/SConscript
index 1b77ec4..58926c6 100644
--- a/intern/opensubdiv/SConscript
+++ b/intern/opensubdiv/SConscript
@@ -33,6 +33,9 @@ sources = env.Glob('*.cc')
defs = [ 'GLEW_STATIC' ]
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+ defs += [ 'NOMINMAX' ]
+
incs = '. ../guardedalloc #extern/clew/include/'
incs += ' ' + env['BF_OPENSUBDIV_INC']
incs += ' #/extern/glew/include'
More information about the Bf-blender-cvs
mailing list