OSDN Git Service

scons: Use libdrm options only where needed.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 10 Apr 2010 01:00:33 +0000 (02:00 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 11 Apr 2010 08:17:34 +0000 (17:17 +0900)
Prevents needless recompiles when switching dri=yes to no.

SConstruct
src/gallium/state_trackers/dri/drm/SConscript

index 56d88cc..8b7ae7d 100644 (file)
@@ -167,16 +167,6 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
                'dl',
        ])
 
-# DRI
-if dri:
-       env.ParseConfig('pkg-config --cflags --libs libdrm')
-       env.Append(CPPDEFINES = [
-               ('USE_EXTERNAL_DXTN_LIB', '1'), 
-               'IN_DRI_DRIVER',
-               'GLX_DIRECT_RENDERING',
-               'GLX_INDIRECT_RENDERING',
-       ])
-
 # LLVM support in the Draw module
 if drawllvm:
     env.Append(CPPDEFINES = ['DRAW_LLVM'])
index b9726ee..1dfaa40 100644 (file)
@@ -7,6 +7,8 @@ if env['dri']:
 
     env = env.Clone()
 
+    env.ParseConfig('pkg-config --cflags --libs libdrm')
+
     env.Append(CPPPATH = [
         '#/src/mesa',
        '#/src/gallium/state_trackers/dri/common',