gallium: Add support for SWR compilation
authorGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 11 Nov 2016 18:09:36 +0000 (12:09 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Mon, 21 Nov 2016 18:44:47 +0000 (12:44 -0600)
Include swr library and include -DHAVE_SWR in the compile line.

v3: split to a separate commit

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/targets/libgl-gdi/SConscript
src/gallium/targets/libgl-xlib/SConscript
src/gallium/targets/osmesa/SConscript

index 2a5236360ba7723453f4d16c6ffd3cf080b268ce..d3251caec57182ce7b3b3aba27fc7e2d30d73893 100644 (file)
@@ -30,6 +30,10 @@ if env['llvm']:
     env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
     drivers += [llvmpipe]
 
+    if env['swr']:
+        env.Append(CPPDEFINES = 'HAVE_SWR')
+        drivers += [swr]
+
 if env['gcc'] and env['machine'] != 'x86_64':
     # DEF parser in certain versions of MinGW is busted, as does not behave as
     # MSVC.  mingw-w64 works fine.
index 0a4f31be86dc1e2516f99df86a10e2ffabab3129..d01bb3c2563b5e684885c51dfe854622ed48e02d 100644 (file)
@@ -48,6 +48,10 @@ if env['llvm']:
     env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
     env.Prepend(LIBS = [llvmpipe])
 
+    if env['swr']:
+        env.Append(CPPDEFINES = 'HAVE_SWR')
+        env.Prepend(LIBS = [swr])
+
 if env['platform'] != 'darwin':
     # Disallow undefined symbols, except with Address Sanitizer, since libasan
     # is not linked on shared libs, as it should be LD_PRELOAD'ed instead
index 7a2a00c85fe210c309bedb5f135ec6ed8d5d8c62..47937a23d29dfcdad28efd9946255f8d0a219e49 100644 (file)
@@ -30,6 +30,10 @@ if env['llvm']:
     env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
     env.Prepend(LIBS = [llvmpipe])
 
+    if env['swr']:
+        env.Append(CPPDEFINES = 'HAVE_SWR')
+        env.Prepend(LIBS = [swr])
+
 if env['platform'] == 'windows':
     if env['gcc'] and env['machine'] != 'x86_64':
         sources += ['osmesa.mingw.def']