summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorOlivier Pena <[email protected]>2015-04-22 15:36:28 +0000
committerJose Fonseca <[email protected]>2015-04-27 15:18:36 +0100
commitf9965347dc0cac8822c44faf7bade09093076c74 (patch)
treeee94936826c1ac39b1fefbe23ca740379a071ece /src/gallium/state_trackers
parentdb2415189a04fd64106a739c635b1433192ef969 (diff)
scons: add target osmesa using gallium state tracker.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/osmesa/Makefile.am2
-rw-r--r--src/gallium/state_trackers/osmesa/SConscript26
2 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/osmesa/Makefile.am b/src/gallium/state_trackers/osmesa/Makefile.am
index 4ba6c207498..22e65c881e0 100644
--- a/src/gallium/state_trackers/osmesa/Makefile.am
+++ b/src/gallium/state_trackers/osmesa/Makefile.am
@@ -39,3 +39,5 @@ AM_CPPFLAGS = \
noinst_LTLIBRARIES = libosmesa.la
libosmesa_la_SOURCES = $(C_SOURCES)
+
+EXTRA_DIST = SConscript
diff --git a/src/gallium/state_trackers/osmesa/SConscript b/src/gallium/state_trackers/osmesa/SConscript
new file mode 100644
index 00000000000..f5519f13762
--- /dev/null
+++ b/src/gallium/state_trackers/osmesa/SConscript
@@ -0,0 +1,26 @@
+import os
+
+Import('*')
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#src/mapi',
+ '#src/mesa',
+ '.',
+])
+
+if env['platform'] == 'windows':
+ env.AppendUnique(CPPDEFINES = [
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+ 'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
+ ])
+ if not env['gles']:
+ # prevent _glapi_* from being declared __declspec(dllimport)
+ env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS'])
+
+st_osmesa = env.ConvenienceLibrary(
+ target ='st_osmesa',
+ source = env.ParseSourceList('Makefile.sources', 'C_SOURCES'),
+)
+Export('st_osmesa')