Mesa (master): scons: fix MSVC, MinGW build

Brian Paul brianp at kemper.freedesktop.org
Sat Oct 17 16:06:52 UTC 2015


Module: Mesa
Branch: master
Commit: 3272f632eec768c79000836e9bc45b90229789e7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3272f632eec768c79000836e9bc45b90229789e7

Author: Brian Paul <brianp at vmware.com>
Date:   Sat Oct 17 10:02:04 2015 -0600

scons: fix MSVC, MinGW build

Duplicate the glsl_types_hack.cpp work-around from the libgl-xlib target.

---

 src/gallium/targets/libgl-gdi/SConscript          |   10 +++++++++-
 src/gallium/targets/libgl-gdi/glsl_types_hack.cpp |    3 +++
 src/gallium/targets/osmesa/SConscript             |    7 ++++++-
 src/gallium/targets/osmesa/glsl_types_hack.cpp    |    3 +++
 4 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 594f34d..eb777a8 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -7,6 +7,10 @@ env = env.Clone()
 
 env.Append(CPPPATH = [
     '#src',
+    '#src/mesa',
+    '#src/mapi',
+    '#src/glsl',
+    '#src/glsl/nir',
     '#src/gallium/state_trackers/wgl',
     '#src/gallium/winsys/sw',
 ])
@@ -20,7 +24,11 @@ env.Append(LIBS = [
 
 env.Prepend(LIBS = [mesautil])
 
-sources = ['libgl_gdi.c']
+sources = [
+    'libgl_gdi.c',
+    'glsl_types_hack.cpp'
+]
+
 drivers = []
 
 if True:
diff --git a/src/gallium/targets/libgl-gdi/glsl_types_hack.cpp b/src/gallium/targets/libgl-gdi/glsl_types_hack.cpp
new file mode 100644
index 0000000..5c042f2
--- /dev/null
+++ b/src/gallium/targets/libgl-gdi/glsl_types_hack.cpp
@@ -0,0 +1,3 @@
+/* errrg scons.. otherwise "scons: *** Two environments with different actions were specified for the same target: $mesa/build/linux-x86_64-debug/glsl/nir/glsl_types.os" */
+#include "glsl_types.cpp"
+
diff --git a/src/gallium/targets/osmesa/SConscript b/src/gallium/targets/osmesa/SConscript
index 4a9115b..78930a9 100644
--- a/src/gallium/targets/osmesa/SConscript
+++ b/src/gallium/targets/osmesa/SConscript
@@ -5,6 +5,8 @@ env = env.Clone()
 env.Prepend(CPPPATH = [
     '#src/mapi',
     '#src/mesa',
+    '#src/glsl',
+    '#src/glsl/nir',
     #Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
 ])
 
@@ -22,7 +24,10 @@ env.Prepend(LIBS = [
 
 env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_SOFTPIPE'])
 
-sources = ['target.c']
+sources = [
+    'target.c',
+    'glsl_types_hack.cpp'
+]
 
 if env['llvm']:
     env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
diff --git a/src/gallium/targets/osmesa/glsl_types_hack.cpp b/src/gallium/targets/osmesa/glsl_types_hack.cpp
new file mode 100644
index 0000000..5c042f2
--- /dev/null
+++ b/src/gallium/targets/osmesa/glsl_types_hack.cpp
@@ -0,0 +1,3 @@
+/* errrg scons.. otherwise "scons: *** Two environments with different actions were specified for the same target: $mesa/build/linux-x86_64-debug/glsl/nir/glsl_types.os" */
+#include "glsl_types.cpp"
+




More information about the mesa-commit mailing list