Mesa (master): scons: Add X11 include path if X11 is available.

Emil Velikov evelikov at kemper.freedesktop.org
Thu Jan 22 21:30:17 UTC 2015


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

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Mon Jan 19 12:54:44 2015 -0800

scons: Add X11 include path if X11 is available.

Mac OS X XQuartz places X11 headers at /opt/X11/include.

This patch fixes this Mac OS X SCons build error.

  Compiling src/gallium/state_trackers/glx/xlib/glx_api.c ...
In file included from src/gallium/state_trackers/glx/xlib/glx_api.c:34:
include/GL/glx.h:30:10: fatal error: 'X11/Xlib.h' file not found
         ^

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 scons/gallium.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/scons/gallium.py b/scons/gallium.py
index 8e2090b..5195508 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -624,6 +624,9 @@ def generate(env):
     env.PkgCheckModules('DRM', ['libdrm >= 2.4.38'])
     env.PkgCheckModules('UDEV', ['libudev >= 151'])
 
+    if env['x11']:
+        env.Append(CPPPATH = env['X11_CPPPATH'])
+
     env['dri'] = env['x11'] and env['drm']
 
     # for debugging




More information about the mesa-commit mailing list