gdi: Fix the build when llvmpipe is requested (the default) but llvm is not present.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 5 Oct 2009 17:32:36 +0000 (18:32 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 9 Oct 2009 10:08:17 +0000 (11:08 +0100)
src/gallium/winsys/gdi/SConscript

index f5e6d36d89c2ae8082c444ce03aac9d0a9806191..8f556daf04a79d149187c176f55095a978e3313f 100644 (file)
@@ -18,14 +18,20 @@ if env['platform'] == 'windows':
         'ws2_32',
     ])
 
-    if 'llvmpipe' in env['drivers']:
-        sources = ['gdi_llvmpipe_winsys.c']
-        drivers = [llvmpipe]
-        env.Tool('llvm')
-    elif 'softpipe' in env['drivers']:
+    sources = []
+    drivers = []
+
+    if 'softpipe' in env['drivers']:
         sources = ['gdi_softpipe_winsys.c']
         drivers = [softpipe]
-    else:
+
+    if 'llvmpipe' in env['drivers']:
+        env.Tool('llvm')
+        if 'LLVM_VERSION' in env:
+            sources = ['gdi_llvmpipe_winsys.c']
+            drivers = [llvmpipe]
+
+    if not sources or not drivers:
         print 'warning: softpipe or llvmpipe not selected, gdi winsys disabled'
         Return()