scons: fix MSVC, MinGW build
authorBrian Paul <brianp@vmware.com>
Sat, 17 Oct 2015 16:02:04 +0000 (10:02 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 17 Oct 2015 16:06:49 +0000 (10:06 -0600)
Duplicate the glsl_types_hack.cpp work-around from the libgl-xlib target.

src/gallium/targets/libgl-gdi/SConscript
src/gallium/targets/libgl-gdi/glsl_types_hack.cpp [new file with mode: 0644]
src/gallium/targets/osmesa/SConscript
src/gallium/targets/osmesa/glsl_types_hack.cpp [new file with mode: 0644]

index 594f34d7fadff5385c5ba9d7ea7bc73015a75197..eb777a86cb2dd9b5cdc696ff0a4abbe31bb7b333 100644 (file)
@@ -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 (file)
index 0000000..5c042f2
--- /dev/null
@@ -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"
+
index 4a9115ba1cfaf36ddeef4c144075669cb01f0a47..78930a98e039ee449899ce48adc0817bca410108 100644 (file)
@@ -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 (file)
index 0000000..5c042f2
--- /dev/null
@@ -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"
+