summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-03-24 14:32:25 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-04-06 14:21:48 -0700
commitfeceea4ab61ff64c4fa9c5f32cda36e22a150e5e (patch)
treed2cab58177c34b1ad66c95f9a932452caa76e556
parent5887401258d1a1e118e34c735e313f620b885f57 (diff)
meson: build with meson for linux and mingwmeson
-rw-r--r--.travis.yml25
-rw-r--r--cross/ubuntu-mingw32.txt39
-rw-r--r--meson.build252
-rw-r--r--meson_options.txt13
-rw-r--r--src/demos/meson.build82
-rw-r--r--src/egl/eglut/meson.build49
-rw-r--r--src/egl/meson.build34
-rw-r--r--src/egl/oes_vg/meson.build24
-rw-r--r--src/egl/opengl/meson.build39
-rw-r--r--src/egl/opengles1/meson.build45
-rw-r--r--src/egl/opengles2/meson.build37
-rw-r--r--src/egl/openvg/meson.build38
-rw-r--r--src/egl/openvg/trivial/meson.build56
-rw-r--r--src/fp/meson.build34
-rw-r--r--src/fp/tri-depth.c1
-rw-r--r--src/fpglsl/meson.build22
-rw-r--r--src/glsl/meson.build66
-rw-r--r--src/gs/meson.build22
-rw-r--r--src/meson.build52
-rw-r--r--src/objviewer/meson.build25
-rw-r--r--src/osdemos/meson.build25
-rw-r--r--src/perf/meson.build63
-rw-r--r--src/rbug/meson.build43
-rw-r--r--src/redbook/meson.build108
-rw-r--r--src/samples/meson.build59
-rw-r--r--src/slang/meson.build44
-rw-r--r--src/tests/getprocaddress.py47
-rw-r--r--src/tests/meson.build183
-rw-r--r--src/tools/meson.build22
-rw-r--r--src/trivial/meson.build206
-rw-r--r--src/util/meson.build47
-rw-r--r--src/vp/meson.build26
-rw-r--r--src/vpglsl/meson.build26
-rw-r--r--src/wgl/meson.build51
-rw-r--r--src/wgl/rtotex/meson.build30
-rw-r--r--src/xdemos/meson.build101
-rw-r--r--subprojects/.gitignore3
-rw-r--r--subprojects/freeglut.wrap12
-rw-r--r--subprojects/glew.wrap12
39 files changed, 2036 insertions, 27 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..3ed3ae36
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,25 @@
+sudo: false
+
+language:
+ - cpp
+
+matrix:
+ include:
+ - os: linux
+ compiler: gcc
+ services: docker
+ - os: linux
+ compiler: clang
+ services: docker
+ - os: linux
+ env: CROSS="--cross-file cross/ubuntu-mingw32.txt"
+ services: docker
+
+before_install:
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull dcbaker/mesa-demosci ; fi
+
+script:
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM dcbaker/mesa-demosci > Dockerfile ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS='true' CC=$CC CXX=$CXX ./mesademos-run-tests.sh $CROSS" ; fi
diff --git a/cross/ubuntu-mingw32.txt b/cross/ubuntu-mingw32.txt
new file mode 100644
index 00000000..2887958b
--- /dev/null
+++ b/cross/ubuntu-mingw32.txt
@@ -0,0 +1,39 @@
+[binaries]
+c = 'i686-w64-mingw32-gcc'
+cpp = 'i686-w64-mingw32-g++'
+ar = 'i686-w64-mingw32-ar'
+strip = 'i686-w64-mingw32-strip'
+windres = 'i686-w64-mingw32-windres'
+# We don't want to rely on pkgconfig for Windows, but meson exepcts something,
+# false will satisfy meson that it's querying something, but also never return a
+# value it will try to cache
+pkgconfig = 'false'
+
+# XXX: We don't want to rely on WINE
+#exe_wrapper = 'wine' # A command used to run generated executables.
+
+[properties]
+sizeof_int = 4
+sizeof_wchar_t = 4
+sizeof_void* = 4
+
+alignment_char = 1
+alignment_void* = 4
+alignment_double = 4
+
+has_function_printf = true
+
+root = '/usr/i686-w64-mingw32'
+c_args = []
+c_link_args = []
+
+glew_include_dir = 'glew/glew-2.0.0/include'
+glew_library = '/home/dylan/source/mesa-demos/glew/glew-2.0.0/bin/Release/Win32/'
+
+[host_machine]
+system = 'windows'
+cpu_family = 'x86'
+cpu = 'i686'
+endian = 'little'
+
+# vim: ft=dosini
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..6d3fb42e
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,252 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+project('mesa-demos', ['c', 'cpp'], license : 'MIT', version : '8.3.0')
+
+host_system = host_machine.system()
+cc = meson.get_compiler('c')
+# Meson uses 'cpp' for C++, so rather than using both cpp and cxx just stick
+# with meson's naming scheme, even though many people associate 'cpp' with
+# 'C PreProcessor', not C++
+cpp = meson.get_compiler('cpp')
+
+dep_egl = []
+dep_gl = []
+dep_gles1 = []
+dep_gles2 = []
+dep_glu = []
+dep_m = []
+dep_osmesa = []
+dep_thread = []
+dep_wayland = []
+dep_x11 = []
+dep_xext = []
+dep_winmm = []
+
+need_glew_sub = false
+need_freeglut_sub = false
+
+if host_system == 'windows'
+ dep_gl = cc.find_library('opengl32')
+ dep_glu = cc.find_library('glu32')
+ need_glew_sub = true
+ need_freeglut_sub = true
+ add_project_arguments('-DHAVE_FREEGLUT', language : 'c')
+ add_project_arguments('-DHAVE_FREEGLUT', language : 'cpp')
+else
+ dep_gl = dependency('gl')
+ dep_glu = dependency('glu')
+ dep_glew = dependency('glew', version : '>=1.5.4')
+
+ # Some Linux distros have a pkgconfig file for freeglut, other's dont. Try to
+ # use the pkgconfig file before falling back to searching for headers.
+ dep_glut = dependency('freeglut', required : false)
+ if dep_glut.found()
+ add_project_arguments('-DHAVE_FREEGLUT', language : 'c')
+ add_project_arguments('-DHAVE_FREEGLUT', language : 'cpp')
+ else
+ dep_glut = cc.find_library('glut')
+ if cc.has_header('GL/freeglut.h')
+ add_project_arguments('-DHAVE_FREEGLUT', language : 'c')
+ add_project_arguments('-DHAVE_FREEGLUT', language : 'cpp')
+ endif
+ endif
+endif
+
+if host_system.startswith('linux')
+ add_project_arguments('-D_GNU_SOURCE', '-DPTHREADS', language : 'c')
+ add_project_arguments('-D_GNU_SOURCE', '-DPTHREADS', language : 'cpp')
+ dep_thread = dependency('threads')
+ dep_m = cc.find_library('m')
+ dep_x11 = dependency('x11')
+elif host_system.contains('gnu')
+ add_project_arguments('-D_GNU_SOURCE', '-DPTHREADS', language : 'c')
+ add_project_arguments('-D_GNU_SOURCE', '-DPTHREADS', language : 'cpp')
+ dep_thread = dependency('threads')
+ dep_x11 = dependency('x11')
+elif host_system.startswith('solaris')
+ add_project_arguments('-DPTHREADS', '-DSVR4', language : 'c')
+ add_project_arguments('-DPTHREADS', '-DSVR4', language : 'cpp')
+ dep_thread = dependency('threads')
+ dep_x11 = dependency('x11')
+ # TODO: some things are missing here
+elif host_system.startswith('cygwin')
+ add_project_arguments('-DPTHREADS', language : 'c')
+ add_project_arguments('-DPTHREADS', language : 'cpp')
+ dep_thread = dependency('threads')
+ dep_x11 = dependency('x11')
+elif host_system == 'windows'
+ # Nobody likes to include windows.h:
+ # - Microsoft's GL/gl.h header depends on windows.h but doesn't include it;
+ # - GLEW temporarily defines the necessary defines but undefines them later
+ # - certain GLUT distributions don't include it;
+ # - most of our programs are meant to be portable so don't include it.
+ #
+ # We could try to replicate the windows.h definitions required by GL/gl.h,
+ # but the build time savings don't compensate the constant headaches that
+ # brings, so instead we force windows.h to be included on every file.
+ if cc.get_id() == 'msvc'
+ # TODO
+ else # MinGw
+ add_project_arguments('--include', 'windows.h', language : 'c')
+ add_project_arguments('--include', 'windows.h', language : 'cpp')
+
+ if cc.has_argument('-static-libgcc')
+ add_project_link_arguments('-static-libgcc', language : 'c')
+ endif
+ if cc.has_argument('-static-libstdc++')
+ add_project_link_arguments('-static-libstdc++', language : 'cpp')
+ endif
+
+ # XXX: this probably isn't right, but it gets things building
+ add_project_arguments('-DGLUT_DISABLE_ATEXIT_HACK', language : 'c')
+ add_project_arguments('-DGLUT_DISABLE_ATEXIT_HACK', language : 'cpp')
+ endif
+
+ # Don't define min/max macros
+ add_project_arguments('-DNOMINMAX', language : 'c')
+ add_project_arguments('-DNOMINMAX', language : 'cpp')
+
+ # MSVC and MinGW only define and use APIENTRY
+ add_project_arguments('-DGLAPIENTRY=__stdcall', language : 'c')
+ add_project_arguments('-DGLAPIENTRY=__stdcall', language : 'cpp')
+
+ dep_winmm = cc.find_library('winmm')
+endif
+
+with_egl = false
+with_freetype2 = false
+with_gbm = false
+with_gles1 = false
+with_gles2 = false
+with_libdrm = false
+with_mesa_source = get_option('mesa-sourcedir') != 'none'
+with_osmesa = false
+with_rbug = get_option('with-rbug')
+with_vg = false
+with_wayland = false
+with_wgl = false
+with_x11 = false
+if with_rbug
+ if not with_mesa_source
+ error('rbug requires mesa source')
+ endif
+endif
+if with_mesa_source
+ prog_python = find_program('python2', 'python')
+ mesa_source = get_option('mesa-sourcedir')
+endif
+if get_option('with-egl') != 'no'
+ dep_egl = dependency('egl', required : get_option('with-egl') == 'yes')
+ with_egl = dep_egl.found()
+endif
+if get_option('with-wgl') != 'no'
+ with_wgl = (host_system == 'windows')
+ if not with_wgl and get_option('with-wgl') == 'yes'
+ error('WGL only support when targeting Windows')
+ endif
+endif
+if get_option('with-gles1') != 'no'
+ dep_gles1 = dependency('glesv1_cm', required : get_option('with-gles1') == 'yes')
+ with_gles1 = dep_gles1.found()
+endif
+if get_option('with-gles2') != 'no'
+ dep_gles2 = dependency('glesv2', required : get_option('with-gles2') == 'yes')
+ with_gles2 = dep_gles2.found()
+endif
+# TODO: I'm not sure this is correct.
+if get_option('with-vg') != 'no'
+ dep_vg = dependency('vg', required : get_option('with-vg') == 'yes')
+ with_vg = dep_vg.found()
+endif
+if get_option('with-osmesa') != 'no'
+ dep_osmesa = dependency('osmesa', required : get_option('with-osmesa') == 'yes')
+ with_osmesa = dep_osmesa.found()
+endif
+if get_option('with-libdrm') != 'no'
+ dep_libdrm = dependency('libdrm', required : get_option('with-libdrm') == 'yes')
+ with_libdrm = dep_libdrm.found()
+endif
+if get_option('with-x11') != 'no'
+ dep_x11 = dependency('x11', required : get_option('with-x11') == 'yes')
+ with_x11 = dep_x11.found()
+ if dep_x11.found()
+ dep_xext = dependency('xext')
+ endif
+endif
+if get_option('with-wayland') != 'no'
+ _wl_client = dependency('wayland-client', required : get_option('with-wayland') == 'yes')
+ _wl_egl = dependency('wayland-egl', required : get_option('with-wayland') == 'yes')
+ dep_wayland += [_wl_client, _wl_egl]
+ with_wayland = _wl_client.found() and _wl_egl.found()
+endif
+if get_option('with-gbm') != 'no'
+ dep_gbm = dependency('gbm', required : get_option('with-gbm') == 'yes')
+ with_gbm = dep_gbm.found()
+endif
+if get_option('with-freetype2') != 'no'
+ dep_freetype2 = dependency('freetype2', required : get_option('with-freetype2') == 'yes')
+ with_freetype2 = dep_freetype2.found()
+endif
+
+# TODO: Make this configurable
+add_project_arguments('-DDEMOS_DATA_DIR="../data/"', language: 'c')
+add_project_arguments('-DDEMOS_DATA_DIR="../data/"', language: 'cpp')
+
+if cc.get_id() == 'msvc'
+ # TODO:
+else
+ potential_c_flags = [
+ '-Wall',
+ '-Wpointer-arith',
+ '-Wstrict-prototypes',
+ '-Wmissing-prototypes',
+ '-Wmissing-declarations',
+ '-Wnested-externs',
+ '-Wno-strict-aliasing',
+ '-Wbad-function-cast',
+ '-Wold-style-definition',
+ '-Wdeclaration-after-statement',
+ ]
+endif
+
+foreach f : potential_c_flags
+ if cc.has_argument(f)
+ add_project_arguments(f, language : 'c')
+ endif
+endforeach
+
+# TODO: Make this configurable
+add_project_arguments('-DDEMOS_DATA_DIR="../data/"', language: 'c')
+add_project_arguments('-DDEMOS_DATA_DIR="../data/"', language: 'cpp')
+
+# There is currently a bug that prevents add_project_arguments being called
+# after subproject
+# https://github.com/mesonbuild/meson/issues/1554
+if need_freeglut_sub
+ _sub = subproject('freeglut')
+ dep_glut = _sub.get_variable('freeglut_dep')
+endif
+if need_glew_sub
+ sub_glew = subproject('glew')
+ dep_glew = sub_glew.get_variable('glew_dep')
+endif
+
+subdir('src')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..94b4af98
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,13 @@
+option('with-egl', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-wgl', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-gles1', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-gles2', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-vg', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-osmesa', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-libdrm', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-x11', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-wayland', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-gbm', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-freetype2', type : 'combo', choices : ['auto', 'no', 'yes'], value : 'auto')
+option('with-rbug', type : 'boolean', value : false)
+option('mesa-sourcedir', type : 'string', value : 'none')
diff --git a/src/demos/meson.build b/src/demos/meson.build
new file mode 100644
index 00000000..adbc8e87
--- /dev/null
+++ b/src/demos/meson.build
@@ -0,0 +1,82 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'arbfplight.c',
+ 'arbfslight.c',
+ 'arbocclude.c',
+ 'arbocclude2.c',
+ 'bounce.c',
+ 'clearspd.c',
+ 'dinoshade.c',
+ 'fbotexture.c',
+ 'fogcoord.c',
+ 'fplight.c',
+ 'fslight.c',
+ 'gamma.c',
+ 'gearbox.c',
+ 'gears.c',
+ 'geartrain.c',
+ 'glinfo.c',
+ 'morph3d.c',
+ 'paltex.c',
+ 'pixeltest.c',
+ 'pointblast.c',
+ 'ray.c',
+ 'renormal.c',
+ 'shadowtex.c',
+ 'singlebuffer.c',
+ 'spectex.c',
+ 'spriteblast.c',
+ 'stex3d.c',
+ 'terrain.c',
+ 'tessdemo.c',
+ 'texenv.c',
+ 'trispd.c',
+ 'vao_demo.c',
+ 'copypix.c',
+ 'cubemap.c',
+ 'cuberender.c',
+ 'dissolve.c',
+ 'drawpix.c',
+ 'engine.c',
+ 'fbo_firecube.c',
+ 'fire.c',
+ 'gloss.c',
+ 'gltestperf.c',
+ 'ipers.c',
+ 'isosurf.c',
+ 'lodbias.c',
+ 'multiarb.c',
+ 'projtex.c',
+ 'readpix.c',
+ 'reflect.c',
+ 'teapot.c',
+ 'texcyl.c',
+ 'textures.c',
+ 'tunnel2.c',
+ 'winpos.c',
+]
+
+foreach e : executables
+ executable(e, e, dependencies : [dep_gl, dep_glew, dep_util, dep_m, dep_winmm], install : true)
+endforeach
+executable('tunnel', ['tunnel.c', 'tunneldat.h'], dependencies : [dep_util, dep_m, dep_winmm], install : true)
+executable('rain', ['rain.cxx', 'particles.cxx'], dependencies : [dep_util, dep_m, dep_winmm], install : true)
diff --git a/src/egl/eglut/meson.build b/src/egl/eglut/meson.build
new file mode 100644
index 00000000..254b34f7
--- /dev/null
+++ b/src/egl/eglut/meson.build
@@ -0,0 +1,49 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+if with_egl and with_x11
+ libeglut_x11 = static_library(
+ 'eglut_x11',
+ ['eglut.c', 'eglut.h', 'eglutint.h', 'eglut_x11.c'],
+ dependencies : [dep_x11, dep_egl],
+ )
+
+ dep_eglut_x11 = declare_dependency(
+ link_with : libeglut_x11,
+ include_directories : include_directories('.'),
+ )
+else
+ dep_eglut_x11 = []
+endif
+
+if with_wayland
+ libeglut_wl = static_library(
+ 'eglut_wl',
+ ['eglut.c', 'eglut.h', 'eglutint.h', 'eglut_wayland.c'],
+ dependencies : [dep_wayland, dep_egl],
+ )
+
+ dep_eglut_wl = declare_dependency(
+ link_with : libeglut_wl,
+ include_directories : include_directories('.'),
+ )
+else
+ dep_eglut_wl = []
+endif
diff --git a/src/egl/meson.build b/src/egl/meson.build
new file mode 100644
index 00000000..1d74d039
--- /dev/null
+++ b/src/egl/meson.build
@@ -0,0 +1,34 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+subdir('eglut')
+subdir('opengl')
+if with_gles1
+ subdir('opengles1')
+endif
+if with_gles2
+ subdir('opengles2')
+endif
+if with_vg
+ subdir('openvg')
+endif
+if with_vg and with_gles1 and with_x11
+ subdir(oes_vg)
+endif
diff --git a/src/egl/oes_vg/meson.build b/src/egl/oes_vg/meson.build
new file mode 100644
index 00000000..b2845a5e
--- /dev/null
+++ b/src/egl/oes_vg/meson.build
@@ -0,0 +1,24 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+common_deps = [dep_gles1, dep_egl, dep_vg, dep_x11, dep_m, dep_x11]
+
+executable('vgimage2tex', 'vgimage2tex.c', dependencies : common_deps, install : true)
+executable('tex2vgimage', 'tex2vgimage.c', dependencies : common_deps, install : true)
diff --git a/src/egl/opengl/meson.build b/src/egl/opengl/meson.build
new file mode 100644
index 00000000..436e9011
--- /dev/null
+++ b/src/egl/opengl/meson.build
@@ -0,0 +1,39 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable('eglinfo', 'eglinfo.c', dependencies : dep_egl,
+ include_directories : inc_util)
+executable('peglgears', 'peglgears.c', dependencies : [dep_gl, dep_egl, dep_m],
+ include_directories : inc_util)
+if with_libdrm and with_gbm
+ executable('eglkms', 'eglkms.c', dependencies : [dep_gl, dep_egl, dep_libdrm, dep_gbm],
+ include_directories : inc_util)
+endif
+if with_x11
+ executable('eglgears_x11', 'eglgears.c', dependencies : [dep_m, dep_gl, dep_eglut_x11],
+ include_directories : inc_util)
+ executable('egltri_x11', 'egltri.c', dependencies : [dep_gl, dep_eglut_x11],
+ include_directories : inc_util)
+ executable('xeglgears', 'xeglgears.c', dependencies : [dep_m, dep_gl, dep_eglut_x11],
+ include_directories : inc_util)
+ executable('xeglthreads', 'xeglthreads.c',
+ dependencies : [dep_m, dep_gl, dep_eglut_x11, dep_thread],
+ include_directories : inc_util)
+endif
diff --git a/src/egl/opengles1/meson.build b/src/egl/opengles1/meson.build
new file mode 100644
index 00000000..b3e801cd
--- /dev/null
+++ b/src/egl/opengles1/meson.build
@@ -0,0 +1,45 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+common_deps = [dep_gles1, dep_egl, dep_x11, dep_m]
+
+executables = [
+ 'bindtex.c',
+ 'es1_info.c',
+ 'msaa.c',
+ 'pbuffer.c',
+ 'render_tex.c',
+ 'texture_from_pixmap.c',
+ 'two_win.c',
+]
+foreach e : executables
+ executable(e, e, dependencies : common_deps)
+endforeach
+
+executables = [
+ ['clear', 'clear.c'],
+ ['drawtex_x11', 'drawtex.c'],
+ ['gears_x11', 'gears.c'],
+ ['torus_x11', 'torus.c'],
+ ['tri_x11', 'tri.c'],
+]
+foreach e : executables
+ executable(e[0], e[1], dependencies : [common_deps, dep_eglut_x11])
+endforeach
diff --git a/src/egl/opengles2/meson.build b/src/egl/opengles2/meson.build
new file mode 100644
index 00000000..6ecbc800
--- /dev/null
+++ b/src/egl/opengles2/meson.build
@@ -0,0 +1,37 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+common_deps = [dep_gles2, dep_egl, dep_x11, dep_m]
+
+if with_x11
+ executables = [
+ ['es2_info', 'es2_info.c'],
+ ['es2gears_x11', 'es2gears.c'],
+ ['es2tri', 'es2tri.c'],
+ ]
+ foreach e : executables
+ executable(e[0], e[1], dependencies : [common_deps, dep_eglut_x11], install : true)
+ endforeach
+endif
+
+if with_wayland
+ executable('es2gears_wayland', 'es2gears.c',
+ dependencies : [common_deps, dep_eglut_wl], install : true)
+endif
diff --git a/src/egl/openvg/meson.build b/src/egl/openvg/meson.build
new file mode 100644
index 00000000..dfbabae7
--- /dev/null
+++ b/src/egl/openvg/meson.build
@@ -0,0 +1,38 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+if have_x11
+ executable(
+ 'lion_x11',
+ ['lion.c', 'lion-render.c', 'lion-render.h'],
+ dependencies : [dep_vg, dep_egl, dep_x11, dep_eglut_x11, dep_m],
+ )
+ executable(
+ 'sp_x11',
+ 'sp.c',
+ dependencies : [dep_vg, dep_egl, dep_x11, dep_eglut_x11, dep_m],
+ )
+endif
+
+if have_freetype2
+ executable('text', 'text.c', dependencies : [dep_vg, dep_egl, dep_x11, dep_freetype2])
+endif
+
+subdir('trivial')
diff --git a/src/egl/openvg/trivial/meson.build b/src/egl/openvg/trivial/meson.build
new file mode 100644
index 00000000..a52c1836
--- /dev/null
+++ b/src/egl/openvg/trivial/meson.build
@@ -0,0 +1,56 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+common_deps = [dep_x11, dep_egl, dep_vg, dep_m]
+
+executables = [
+ 'cap',
+ 'clear',
+ 'color_transform',
+ 'coord',
+ 'dash',
+ 'ellipse',
+ 'filter',
+ 'gradorigin',
+ 'image',
+ 'layer',
+ 'lineto',
+ 'lingrad',
+ 'lookup',
+ 'mask4',
+ 'mask',
+ 'mask_render',
+ 'paint',
+ 'path3',
+ 'radialgrad',
+ 'readpixels',
+ 'roundedrect',
+ 'star-nonzero',
+ 'star-oddeven',
+ 'stroke2',
+ 'stroke',
+]
+foreach e : executables
+ executable(e, e + '.c', dependencies : common_deps)
+endforeach
+
+libvgcommon = static_library('vgcommon', ['eglcommon.c', 'eglcommon.h'])
+executable('arc', 'arc.c', dependencies : common_deps, link_with : libvgcommon)
+executable('blend', 'blend.c', dependencies : common_deps, link_with : libvgcommon)
diff --git a/src/fp/meson.build b/src/fp/meson.build
new file mode 100644
index 00000000..63428d23
--- /dev/null
+++ b/src/fp/meson.build
@@ -0,0 +1,34 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'tri-tex',
+ 'point-position',
+ 'tri-depth',
+ 'tri-depth2',
+ 'tri-depthwrite',
+ 'tri-depthwrite2',
+ 'tri-param',
+ 'fp-tri',
+]
+foreach e : executables
+ executable(e, e + '.c', dependencies : [dep_glut, dep_gl, dep_glew, dep_glu, dep_m],
+ include_directories : inc_util)
+endforeach
diff --git a/src/fp/tri-depth.c b/src/fp/tri-depth.c
index 2a2ce287..997c43b7 100644
--- a/src/fp/tri-depth.c
+++ b/src/fp/tri-depth.c
@@ -6,7 +6,6 @@
#include "glut_wrap.h"
-
static void Init( void )
{
/* scale of 10.0 gives me a visible result on nv hardware.
diff --git a/src/fpglsl/meson.build b/src/fpglsl/meson.build
new file mode 100644
index 00000000..aed5c872
--- /dev/null
+++ b/src/fpglsl/meson.build
@@ -0,0 +1,22 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable('fpglsl-tri', 'fp-tri.c', dependencies : [dep_glut, dep_gl, dep_glew, dep_glu, dep_m],
+ include_directories : inc_util)
diff --git a/src/glsl/meson.build b/src/glsl/meson.build
new file mode 100644
index 00000000..918b98ec
--- /dev/null
+++ b/src/glsl/meson.build
@@ -0,0 +1,66 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'array',
+ 'bezier',
+ 'bitmap',
+ 'brick',
+ 'bump',
+ 'blinking-teapot',
+ 'convolutions',
+ 'deriv',
+ 'fragcoord',
+ 'fsraytrace',
+ 'geom-outlining-130',
+ 'geom-outlining-150',
+ 'geom-sprites',
+ 'geom-stipple-lines',
+ 'geom-wide-lines',
+ 'identity',
+ 'linktest',
+ 'mandelbrot',
+ 'multinoise',
+ 'multitex',
+ 'noise2',
+ 'noise',
+ 'pointcoord',
+ 'points',
+ 'samplers',
+ 'shadow_sampler',
+ 'shtest',
+ 'simplex-noise',
+ 'skinning',
+ 'texaaline',
+ 'texdemo1',
+ 'toyball',
+ 'trirast',
+ 'twoside',
+ 'vert-or-frag-only',
+ 'vert-tex',
+ 'vsraytrace',
+]
+foreach e : executables
+ executable(e, e + '.c', dependencies : [dep_util, dep_m, dep_glew], install : true)
+endforeach
+
+executable('samplers_array', 'samplers.c', c_args : '-DSAMPLERS_ARRAY',
+ dependencies : [dep_util, dep_glew], install : true)
+executable('gsraytrace', 'gsraytrace.cpp', dependencies : [dep_util, dep_glew], install :true)
diff --git a/src/gs/meson.build b/src/gs/meson.build
new file mode 100644
index 00000000..9aed88a1
--- /dev/null
+++ b/src/gs/meson.build
@@ -0,0 +1,22 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable('gs-tri', 'gs-tri.c', dependencies : [dep_glut, dep_gl, dep_glu, dep_glew, dep_m],
+ include_directories : inc_util)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..89946146
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,52 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+subdir('util')
+# TODO: data is just install targets
+subdir('demos')
+if with_egl
+ subdir('egl')
+endif
+subdir('fp')
+subdir('fpglsl')
+subdir('glsl')
+subdir('gs')
+subdir('objviewer')
+if with_osmesa
+ subdir('osdemos')
+endif
+subdir('perf')
+if with_rbug
+ subdir('rbug')
+endif
+subdir('redbook')
+subdir('samples')
+subdir('slang')
+subdir('tests')
+subdir('tools')
+subdir('trivial')
+subdir('vp')
+subdir('vpglsl')
+if with_wgl
+ subdir('wgl')
+endif
+if with_x11
+ subdir('xdemos')
+endif
diff --git a/src/objviewer/meson.build b/src/objviewer/meson.build
new file mode 100644
index 00000000..e16273c2
--- /dev/null
+++ b/src/objviewer/meson.build
@@ -0,0 +1,25 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable(
+ 'objview',
+ ['glm.c', 'glm.h', 'glmdraw.c', 'objview.c', 'skybox.c', 'skybox.h'],
+ dependencies : [dep_util, dep_glew, dep_m],
+)
diff --git a/src/osdemos/meson.build b/src/osdemos/meson.build
new file mode 100644
index 00000000..b09948ff
--- /dev/null
+++ b/src/osdemos/meson.build
@@ -0,0 +1,25 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = ['osdemo', 'osdemo16', 'osdemo32']
+
+foreach e : executables
+ executable(e, e + '.c', dependencies : [dep_osmesa, dep_util, dep_m], install : true)
+endforeach
diff --git a/src/perf/meson.build b/src/perf/meson.build
new file mode 100644
index 00000000..92aa7e08
--- /dev/null
+++ b/src/perf/meson.build
@@ -0,0 +1,63 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libperf = static_library(
+ 'perf',
+ ['common.c', 'common.h', 'glmain.c', 'glmain.h'],
+ dependencies : [dep_glut, dep_glew],
+ include_directories : inc_util,
+)
+
+executables = [
+ 'copytex',
+ 'drawoverhead',
+ 'fbobind',
+ 'fill',
+ 'genmipmap',
+ 'readpixels',
+ 'swapbuffers',
+ 'teximage',
+ 'vbo',
+ 'vertexrate',
+]
+foreach e : executables
+ executable(
+ e,
+ e + '.c',
+ link_with : libperf,
+ dependencies : [dep_gl, dep_glu, dep_glew, dep_glut, dep_m],
+ include_directories : inc_util,
+ install : true
+ )
+endforeach
+
+executable(
+ 'glsl-compile-time',
+ 'glsl-compile-time.c',
+ dependencies : [dep_util, dep_glew, dep_m],
+ install : true
+)
+executable(
+ 'glslstateschange',
+ 'glslstateschange.c',
+ dependencies : [dep_util, dep_glew, dep_m],
+ link_with: libperf,
+ install : true
+)
diff --git a/src/rbug/meson.build b/src/rbug/meson.build
new file mode 100644
index 00000000..a1714ac4
--- /dev/null
+++ b/src/rbug/meson.build
@@ -0,0 +1,43 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'bin_to_bmp',
+ 'simple_client',
+ 'simple_server',
+ 'shdr_info',
+ 'shdr_dump',
+ 'shdr_disable',
+ 'ctx_info',
+ 'ctx_rule',
+ 'tex_info',
+ 'tex_dump',
+]
+foreach e : executables
+ executable(
+ e, e + '.c',
+ include_directories : include_directories(
+ join_paths(mesa_source, 'src/gallium/include'),
+ join_paths(mesa_source, 'src/gallium/auxiliary'),
+ join_paths(mesa_source, 'src'),
+ join_paths(mesa_source, 'include'),
+ ),
+ )
+endforeach
diff --git a/src/redbook/meson.build b/src/redbook/meson.build
new file mode 100644
index 00000000..c9504b01
--- /dev/null
+++ b/src/redbook/meson.build
@@ -0,0 +1,108 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'aaindex',
+ 'aapoly',
+ 'aargb',
+ 'accanti',
+ 'accpersp',
+ 'alpha',
+ 'alpha3D',
+ 'anti',
+ 'bezcurve',
+ 'bezmesh',
+ 'checker',
+ 'clip',
+ 'colormat',
+ 'combiner',
+ 'convolution',
+ 'cube',
+ 'cubemap',
+ 'depthcue',
+ 'dof',
+ 'double',
+ 'drawf',
+ 'feedback',
+ 'fog',
+ 'fogcoord',
+ 'fogindex',
+ 'font',
+ 'hello',
+ 'histogram',
+ 'image',
+ 'light',
+ 'lines',
+ 'list',
+ 'material',
+ 'minmax',
+ 'mipmap',
+ 'model',
+ 'movelight',
+ 'multisamp',
+ 'mvarray',
+ 'nurbs',
+ 'pickdepth',
+ 'picksquare',
+ 'plane',
+ 'planet',
+ 'pointp',
+ 'polyoff',
+ 'polys',
+ 'quadric',
+ 'robot',
+ 'sccolorlight',
+ 'scene',
+ 'scenebamb',
+ 'sceneflat',
+ 'select',
+ 'shadowmap',
+ 'smooth',
+ 'stencil',
+ 'stroke',
+ 'surface',
+ 'surfpoints',
+ 'teaambient',
+ 'teapots',
+ 'tess',
+ 'tesswind',
+ 'texbind',
+ 'texgen',
+ 'texprox',
+ 'texsub',
+ 'texture3d',
+ 'texturesurf',
+ 'torus',
+ 'trim',
+ 'unproject',
+ 'varray',
+ 'wrap',
+]
+foreach e : executables
+ executable(e, e + '.c', dependencies : [dep_gl, dep_glut, dep_glu, dep_glew, dep_m],
+ include_directories : inc_util)
+endforeach
+
+executable(
+ 'multitex_rb',
+ 'multitex.c',
+ dependencies : [dep_gl, dep_glut, dep_glu, dep_glew],
+ include_directories : inc_util
+)
diff --git a/src/samples/meson.build b/src/samples/meson.build
new file mode 100644
index 00000000..a5783ba2
--- /dev/null
+++ b/src/samples/meson.build
@@ -0,0 +1,59 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'accum',
+ 'bitmap1',
+ 'bitmap2',
+ 'blendeq',
+ 'blendxor',
+ 'copy',
+ 'cursor',
+ 'depth',
+ 'eval',
+ 'line',
+ 'logo',
+ 'nurb',
+ 'olympic',
+ 'overlay',
+ 'point',
+ 'prim',
+ 'quad',
+ 'shape',
+ 'star',
+ 'stretch',
+ 'texture',
+ 'tri',
+ 'wave',
+ 'fog',
+ 'font',
+ 'select',
+ 'stencil',
+]
+foreach e : executables
+ executable(
+ 'sample_' + e,
+ e + '.c',
+ dependencies : [dep_glut, dep_glu, dep_glew, dep_gl, dep_m],
+ include_directories : inc_util,
+ )
+endforeach
+
+executable('sphere', 'sphere.c', dependencies : [dep_util, dep_m])
diff --git a/src/slang/meson.build b/src/slang/meson.build
new file mode 100644
index 00000000..9e040672
--- /dev/null
+++ b/src/slang/meson.build
@@ -0,0 +1,44 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+sotest = executable(
+ 'sotest',
+ ['sotest.c', 'framework.c', 'framework.h'],
+ dependencies : [dep_gl, dep_glu, dep_glew, dep_glut],
+ include_directories : inc_util,
+)
+cltest = executable(
+ 'cltest',
+ ['cltest.c', 'framework.c', 'framework.h'],
+ dependencies : [dep_gl, dep_glu, dep_glew, dep_glut],
+ include_directories : inc_util,
+)
+vstest = executable(
+ 'vstest',
+ ['vstest.c', 'framework.c', 'framework.h'],
+ dependencies : [dep_gl, dep_glu, dep_glew, dep_glut],
+ include_directories : inc_util,
+)
+
+# FIXME: piping to grep isn't portable
+# Instead these should just return 1 if there is a failure
+test('sotest', sotest)
+test('cltest', cltest)
+test('vstest', vstest)
diff --git a/src/tests/getprocaddress.py b/src/tests/getprocaddress.py
index 9f80ff61..d498d0c8 100644
--- a/src/tests/getprocaddress.py
+++ b/src/tests/getprocaddress.py
@@ -3,25 +3,31 @@
# Helper for the getprocaddress.c test.
+import argparse
+import sys,re, os
-import sys, getopt, re, os
-argc = len(sys.argv)
-if (argc):
- glapi_xml_path = sys.argv[1]
-else:
- glapi_xml_path = "../../src/mapi/glapi/gen/"
-sys.path.append(glapi_xml_path)
-import gl_XML
-import license
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser()
+ parser.add_argument('mesa_path')
+ parser.add_argument('c_file')
+ parser.add_argument('-f', '--file_name')
+ args = parser.parse_args()
+
+ if not args.file_name:
+ args.file_name = os.path.join(args.mesa_path, "gl_API.xml")
+
+ sys.path.insert(0, args.mesa_path)
+ import gl_XML
+ import license
-def FindTestFunctions():
+def FindTestFunctions(c_file):
"""Scan getprocaddress.c for lines that start with "test_" to find
extension function tests. Return a list of names found."""
functions = []
- f = open("getprocaddress.c")
+ f = open(c_file)
if not f:
return functions
for line in f.readlines():
@@ -34,7 +40,7 @@ def FindTestFunctions():
class PrintExports(gl_XML.gl_print_base):
- def __init__(self):
+ def __init__(self, c_file):
gl_XML.gl_print_base.__init__(self)
self.name = "getprocaddress.py (from Mesa)"
@@ -42,7 +48,7 @@ class PrintExports(gl_XML.gl_print_base):
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
- self.tests = FindTestFunctions()
+ self.tests = FindTestFunctions(c_file)
self.prevCategory = ""
return
@@ -82,19 +88,8 @@ static struct name_test_pair functions[] = {"""
if __name__ == '__main__':
- file_name = os.path.join(glapi_xml_path, "gl_API.xml")
-
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:")
- except Exception,e:
- show_usage()
-
- for (arg,val) in args:
- if arg == "-f":
- file_name = val
-
- printer = PrintExports()
+ printer = PrintExports(args.c_file)
- api = gl_XML.parse_GL_API( file_name, gl_XML.gl_item_factory() )
+ api = gl_XML.parse_GL_API( args.file_name, gl_XML.gl_item_factory() )
printer.Print( api )
diff --git a/src/tests/meson.build b/src/tests/meson.build
new file mode 100644
index 00000000..3f4ab81a
--- /dev/null
+++ b/src/tests/meson.build
@@ -0,0 +1,183 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'antialias',
+ 'arbfpspec',
+ 'arbfptest1',
+ 'arbfptexture',
+ 'arbfptrig',
+ 'arbgpuprog',
+ 'arbnpot',
+ 'arbnpot-mipmap',
+ 'arbvparray',
+ 'arbvptest1',
+ 'arbvptest3',
+ 'arbvptorus',
+ 'arbvpwarpmesh',
+ 'backspecular',
+ 'blendxor',
+ 'blitfb',
+ 'bufferobj',
+ 'bug_3050',
+ 'bug_3101',
+ 'bug_texstore_i8',
+ 'calibrate_rast',
+ 'clip',
+ 'condrender',
+ 'copypixrate',
+ 'cva',
+ 'cva_huge',
+ 'cylwrap',
+ 'drawbuffers',
+ 'drawbuffers2',
+ 'drawstencil',
+ 'exactrast',
+ 'ext422square',
+ 'fbotest1',
+ 'fbotest2',
+ 'fbotest3',
+ 'fogcoord',
+ 'fptest1',
+ 'fptexture',
+ 'front-back-modes',
+ 'getteximage',
+ 'glutfx',
+ 'interleave',
+ 'lineclip',
+ 'line-sample',
+ 'manytex',
+ 'mapbufrange',
+ 'minmag',
+ 'mipgen',
+ 'mipmap_comp',
+ 'mipmap_comp_tests',
+ 'mipmap_tunnel',
+ 'multipal',
+ 'multitexarray',
+ 'multiwindow',
+ 'no_s3tc',
+ 'packedpixels',
+ 'pbo',
+ 'persp_hint',
+ 'prim',
+ 'prog_parameter',
+ 'quads',
+ 'random',
+ 'readrate',
+ 'rubberband',
+ 'scissor',
+ 'scissor-viewport',
+ 'seccolor',
+ 'shader_api',
+ 'shadow-sample',
+ 'stencilreaddraw',
+ 'stencilwrap',
+ 'step',
+ 'streaming_rect',
+ 'subtex',
+ 'subtexrate',
+ 'tex1d',
+ 'texcmp',
+ 'texcompress2',
+ 'texcompsub',
+ 'texdown',
+ 'texfilt',
+ 'texgenmix',
+ 'texleak',
+ 'texline',
+ 'texobj',
+ 'unfilledclip',
+ 'viewmemory',
+ 'vparray',
+ 'vpeval',
+ 'vptest1',
+ 'vptest2',
+ 'vptest3',
+ 'vptorus',
+ 'vpwarpmesh',
+ 'yuvrect',
+ 'yuvsquare',
+ 'zbitmap',
+ 'zcomp',
+ 'zdrawpix',
+ 'zreaddraw',
+]
+foreach e : executables
+ executable(
+ 'test_' + e, e + '.c',
+ dependencies : [dep_glut, dep_glew, dep_glu, dep_gl, dep_m],
+ include_directories : inc_util
+ )
+endforeach
+
+executables = [
+ 'afsmultiarb',
+ 'arraytexture',
+ 'bug_3195',
+ 'bumpmap',
+ 'floattex',
+ 'fillrate',
+ 'invert',
+ 'linehacks',
+ 'mipmap_limits',
+ 'mipmap_view',
+ 'shader-interp',
+ 'texrect',
+]
+foreach e : executables
+ executable('test_' + e, e + '.c', dependencies : [dep_util, dep_m])
+endforeach
+
+if with_x11
+ executables = [
+ 'auxbuffer',
+ 'jkrahntest',
+ 'sharedtex',
+ 'texobjshare',
+ ]
+
+ foreach e : executables
+ executable(
+ 'test_' + e, e + '.c',
+ dependencies : [dep_glut, dep_gl, dep_glew, dep_glu, dep_x11, dep_m],
+ include_directories : inc_util,
+ )
+ endforeach
+
+ if with_mesa_source
+ getproclist_h = custom_target(
+ 'getproclist_h',
+ input : ['getprocaddress.py', join_paths(mesa_source, 'src/mapi/glapi/gen'),
+ 'getprocaddress.c'],
+ output : ['getproclist.h'],
+ command : [prog_python, '@INPUT0@', '@INPUT1@', '@INPUT2@'],
+ capture : true,
+ depend_files : join_paths(mesa_source, 'src/mapi/glapi/gen/gl_API.xml')
+ )
+
+ executable(
+ 'getproclist',
+ ['getprocaddress.c', getproclist_h],
+ dependencies : [dep_glut, dep_glew, dep_glu, dep_gl, dep_x11, dep_m],
+ include_directories : inc_util,
+ )
+ endif
+endif
diff --git a/src/tools/meson.build b/src/tools/meson.build
new file mode 100644
index 00000000..1e6d0bb2
--- /dev/null
+++ b/src/tools/meson.build
@@ -0,0 +1,22 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable('dds', 'dds.c', dependencies : [dep_gl, dep_glut, dep_glu, dep_glew],
+ include_directories : inc_util)
diff --git a/src/trivial/meson.build b/src/trivial/meson.build
new file mode 100644
index 00000000..4d98592e
--- /dev/null
+++ b/src/trivial/meson.build
@@ -0,0 +1,206 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'clear-color',
+ 'clear-fbo',
+ 'clear-fbo-scissor',
+ 'clear-fbo-tex',
+ 'clear-random',
+ 'clear-repeat',
+ 'clear-scissor',
+ 'clear-undefined',
+ 'createwin',
+ 'dlist-begin-call-end',
+ 'dlist-dangling',
+ 'dlist-degenerate',
+ 'dlist-edgeflag',
+ 'dlist-edgeflag-dangling',
+ 'dlist-flat-tri',
+ 'dlist-mat-tri',
+ 'dlist-recursive-call',
+ 'dlist-tri-flat-tri',
+ 'dlist-tri-mat-tri',
+ 'draw2arrays',
+ 'drawarrays',
+ 'drawelements',
+ 'drawelements-large',
+ 'drawrange',
+ 'flat-clip',
+ 'fs-tri',
+ 'line',
+ 'line-clip',
+ 'line-cull',
+ 'line-flat',
+ 'lineloop',
+ 'lineloop-clip',
+ 'lineloop-elts',
+ 'line-smooth',
+ 'line-stipple-wide',
+ 'linestrip',
+ 'linestrip-clip',
+ 'linestrip-flat-stipple',
+ 'linestrip-stipple',
+ 'linestrip-stipple-wide',
+ 'line-userclip',
+ 'line-userclip-clip',
+ 'line-userclip-nop',
+ 'line-userclip-nop-clip',
+ 'line-wide',
+ 'line-xor',
+ 'long-fixed-func',
+ 'pgon-mode',
+ 'point',
+ 'point-clip',
+ 'point-param',
+ 'point-sprite',
+ 'point-wide',
+ 'point-wide-smooth',
+ 'poly',
+ 'poly-flat',
+ 'poly-flat-clip',
+ 'poly-flat-unfilled-clip',
+ 'poly-unfilled',
+ 'quad',
+ 'quad-clip-all-vertices',
+ 'quad-clip',
+ 'quad-clip-nearplane',
+ 'quad-degenerate',
+ 'quad-flat',
+ 'quad-offset-factor',
+ 'quad-offset-unfilled',
+ 'quad-offset-units',
+ 'quads',
+ 'quadstrip',
+ 'quadstrip-clip',
+ 'quadstrip-cont',
+ 'quadstrip-flat',
+ 'quad-tex-2d',
+ 'quad-tex-3d',
+ 'quad-tex-alpha',
+ 'quad-tex-pbo',
+ 'quad-tex-sub',
+ 'quad-unfilled',
+ 'quad-unfilled-clip',
+ 'quad-unfilled-stipple',
+ 'readpixels',
+ 'sub-tex',
+ 'tex-quads',
+ 'tri-2101010',
+ 'tri-2101010-dlist',
+ 'tri-alpha',
+ 'tri-alpha-tex',
+ 'tri-array-interleaved',
+ 'tri-blend',
+ 'tri-blend-color',
+ 'tri-blend-max',
+ 'tri-blend-min',
+ 'tri-blend-revsub',
+ 'tri-blend-sub',
+ 'tri',
+ 'tri-clear',
+ 'tri-clip',
+ 'tri-cull-both',
+ 'tri-cull',
+ 'tri-dlist',
+ 'tri-edgeflag',
+ 'tri-edgeflag-pv',
+ 'tri-edgeflag-array',
+ 'trifan',
+ 'trifan-flat',
+ 'trifan-flat-clip',
+ 'trifan-flat-unfilled-clip',
+ 'trifan-unfilled',
+ 'tri-fbo',
+ 'tri-fbo-tex',
+ 'tri-fbo-tex-mip',
+ 'tri-flat',
+ 'tri-flat-clip',
+ 'tri-fog',
+ 'tri-fp',
+ 'tri-fp-const-imm',
+ 'tri-lit',
+ 'tri-lit-material',
+ 'tri-logicop-none',
+ 'tri-logicop-xor',
+ 'tri-mask-tri',
+ 'tri-multitex-vbo',
+ 'tri-orig',
+ 'tri-point-line-clipped',
+ 'tri-query',
+ 'tri-repeat',
+ 'tri-rotate',
+ 'tri-scissor-tri',
+ 'tri-square',
+ 'tri-stencil',
+ 'tri-stipple',
+ 'tristrip',
+ 'tristrip-clip',
+ 'tristrip-flat',
+ 'tri-tex-1d',
+ 'tri-tex-3d',
+ 'tri-tex',
+ 'tri-tex-stipple',
+ 'tri-tri',
+ 'tri-unfilled',
+ 'tri-unfilled-clip',
+ 'tri-unfilled-edgeflag',
+ 'tri-unfilled-fog',
+ 'tri-unfilled-point',
+ 'tri-unfilled-smooth',
+ 'tri-unfilled-tri',
+ 'tri-unfilled-tri-lit',
+ 'tri-unfilled-userclip',
+ 'tri-unfilled-userclip-stip',
+ 'tri-userclip',
+ 'tri-viewport',
+ 'tri-z-9',
+ 'tri-z',
+ 'tri-z-clip',
+ 'tri-z-eq',
+ 'vbo-drawarrays',
+ 'vbo-drawarrays-2101010',
+ 'vbo-drawelements',
+ 'vbo-drawrange',
+ 'vbo-noninterleaved',
+ 'vbo-tri',
+ 'vp-array',
+ 'vp-array-hf',
+ 'vp-array-int',
+ 'vp-clip',
+ 'vp-line-clip',
+ 'vp-tri',
+ 'vp-tri-cb',
+ 'vp-tri-cb-pos',
+ 'vp-tri-cb-tex',
+ 'vp-tri-imm',
+ 'vp-tri-invariant',
+ 'vp-tri-swap',
+ 'vp-tri-tex',
+ 'vp-unfilled',
+]
+foreach e : executables
+ executable(
+ 'trivial_' + e,
+ e + '.c',
+ dependencies : [dep_gl, dep_glu, dep_glut, dep_glew, dep_m],
+ include_directories : inc_util,
+ )
+endforeach
diff --git a/src/util/meson.build b/src/util/meson.build
new file mode 100644
index 00000000..a749fb51
--- /dev/null
+++ b/src/util/meson.build
@@ -0,0 +1,47 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_libutil = [
+ 'gl_wrap.h',
+ 'glut_wrap.h',
+ 'readtex.c',
+ 'readtex.h',
+ 'showbuffer.c',
+ 'showbuffer.h',
+ 'trackball.c',
+ 'trackball.h',
+ # TODO: these are not included in cmake, but glut is always included?
+ 'shaderutil.c',
+ 'shaderutil.h',
+]
+
+libutil = static_library(
+ 'util',
+ files_libutil,
+ dependencies : [dep_gl, dep_glu, dep_glew, dep_glut],
+)
+
+inc_util = include_directories('.')
+
+dep_util = declare_dependency(
+ link_with : libutil,
+ dependencies : [dep_gl, dep_glu, dep_glew, dep_glut],
+ include_directories : inc_util,
+)
diff --git a/src/vp/meson.build b/src/vp/meson.build
new file mode 100644
index 00000000..9c63b145
--- /dev/null
+++ b/src/vp/meson.build
@@ -0,0 +1,26 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable(
+ 'vp-tris',
+ 'vp-tris.c',
+ dependencies : [dep_gl, dep_glew, dep_glut, dep_glu],
+ include_directories : inc_util,
+)
diff --git a/src/vpglsl/meson.build b/src/vpglsl/meson.build
new file mode 100644
index 00000000..d19c8f64
--- /dev/null
+++ b/src/vpglsl/meson.build
@@ -0,0 +1,26 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable(
+ 'vp-tris_glsl',
+ 'vp-tris.c',
+ dependencies : [dep_gl, dep_glew, dep_glut, dep_glu],
+ include_directories : inc_util,
+)
diff --git a/src/wgl/meson.build b/src/wgl/meson.build
new file mode 100644
index 00000000..534740b2
--- /dev/null
+++ b/src/wgl/meson.build
@@ -0,0 +1,51 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executables = [
+ 'wglthreads',
+ 'sharedtex_mt',
+ 'wglcontext',
+ 'wglfont',
+]
+foreach e : executables
+ executable(
+ e,
+ e + '.c',
+ dependencies : [dep_gl, dep_glew],
+ include_directories : include_directories('../xdemos'),
+ install : true
+ )
+endforeach
+
+executable(
+ 'wglinfo',
+ ['wglinfo.c', '../xdemos/glinfo_common.c'],
+ dependencies : [dep_gl, dep_glew],
+ include_directories : include_directories('../xdemos'),
+ install : true,
+)
+executable(
+ 'wincopy',
+ ['wincopy.c', 'wglutil.c'],
+ dependencies : [dep_gl, dep_glew],
+ install : true,
+)
+
+# TODO: subdir('rtotex')
diff --git a/src/wgl/rtotex/meson.build b/src/wgl/rtotex/meson.build
new file mode 100644
index 00000000..a0733d61
--- /dev/null
+++ b/src/wgl/rtotex/meson.build
@@ -0,0 +1,30 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+executable(
+ 'rtotex',
+ ['fps_count.cpp', 'image.cpp', 'interactor.cpp', 'log.cpp', 'main.cpp',
+ 'pbuffer.cpp', 'timer.cpp', 'windows.cpp', 'maths/matrix4x4.cpp',
+ 'maths/plane.cpp', 'maths/vector2d.cpp', 'maths/vector3d.cpp',
+ 'mats/vector4d.cpp'],
+ dependencies : [dep_gl, dep_glew, dep_glut, dep_glu],
+)
+
+# TODO: install data files
diff --git a/src/xdemos/meson.build b/src/xdemos/meson.build
new file mode 100644
index 00000000..aec79834
--- /dev/null
+++ b/src/xdemos/meson.build
@@ -0,0 +1,101 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+libpbutil = static_library('pbutil', ['pbutil.c', 'pbutil.h'])
+
+# FIXME: xdemo requires xmesa.h
+
+executables = [
+ 'glsync',
+ 'glxdemo',
+ 'glxgears',
+ 'glxgears_pixmap',
+ 'glxcontexts',
+ 'glxheads',
+ 'glxpixmap',
+ 'glxpbdemo',
+ 'glxsnoop',
+ 'glxswapcontrol',
+ 'manywin',
+ 'multictx',
+ 'offset',
+ 'overlay',
+ 'shape',
+ 'sharedtex',
+ 'texture_from_pixmap',
+ 'wincopy',
+ 'xfont',
+ 'yuvrect_client',
+]
+foreach e : executables
+ executable(
+ e,
+ e + '.c',
+ dependencies : [dep_gl, dep_glu, dep_x11, dep_xext, dep_m],
+ include_directories : inc_util,
+ install : true,
+ )
+endforeach
+
+executables = [
+ 'glthreads',
+ 'sharedtex_mt',
+]
+foreach e : executables
+ executable(
+ e,
+ e + '.c',
+ dependencies : [dep_gl, dep_x11, dep_thread, dep_m],
+ include_directories : inc_util,
+ install : true,
+ )
+endforeach
+
+executables = [
+ 'glxgears_fbconfig',
+ 'pbinfo',
+ 'pbdemo',
+]
+foreach e : executables
+ executable(
+ e,
+ e + '.c',
+ dependencies : [dep_gl, dep_x11, dep_m],
+ link_with : libpbutil,
+ include_directories : inc_util,
+ install : true,
+ )
+endforeach
+
+executable(
+ 'glxinfo',
+ ['glxinfo.c', 'glinfo_common.c', 'glinfo_common.h'],
+ dependencies : [dep_x11, dep_gl],
+ include_directories : inc_util,
+ install : true,
+)
+
+executable(
+ 'xrotfontdemo',
+ ['xrotfontdemo.c', 'xuserotfont.c', 'xuserotfont.h'],
+ dependencies : [dep_x11, dep_gl],
+ include_directories : inc_util,
+ install : true,
+)
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
new file mode 100644
index 00000000..9a1d1e46
--- /dev/null
+++ b/subprojects/.gitignore
@@ -0,0 +1,3 @@
+*
+!.gitignore
+!*.wrap
diff --git a/subprojects/freeglut.wrap b/subprojects/freeglut.wrap
new file mode 100644
index 00000000..698cb8a0
--- /dev/null
+++ b/subprojects/freeglut.wrap
@@ -0,0 +1,12 @@
+[wrap-file]
+directory = freeglut-3.0.0
+
+source_url = https://sourceforge.net/projects/freeglut/files/freeglut/3.0.0/freeglut-3.0.0.tar.gz
+source_filename = freeglut-3.0.0.tar.gz
+source_hash = 2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2
+
+patch_url = https://people.freedesktop.org/~dbaker/wraps/freeglut-3.0.0-patch.tar.gz
+patch_filename = freeglut-3.0.0-patch.tar.gz
+patch_hash = 880c29abb8d7c1383eb9f84942e0935798d4b8c164e087e44ae4c7fddb5619d6
+
+# vim: ft=dosini
diff --git a/subprojects/glew.wrap b/subprojects/glew.wrap
new file mode 100644
index 00000000..562cec22
--- /dev/null
+++ b/subprojects/glew.wrap
@@ -0,0 +1,12 @@
+[wrap-file]
+directory = glew-2.0.0
+
+source_url = https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz
+source_filename = glew-2.0.0.tgz
+source_hash = c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764
+
+patch_url = https://people.freedesktop.org/~dbaker/wraps/glew-2.0.0-patch.tar.gz
+patch_filename = glew-2.0.0-patch.tar.gz
+patch_hash = 308d915130a3b6a3f3eb5caf2abbbb911c051540dfdebcb2f18c079f260f76d8
+
+# vim: ft=dosini