summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoe Hao Cheng <haochengho12907@gmail.com>2023-03-25 23:18:26 +0800
committerErik Faye-Lund <erik.faye-lund@collabora.com>2023-04-04 19:56:58 +0000
commit9b7a91c9a72fbf33b6d7cd16316a2230ffba51b0 (patch)
treefefbea0cce2ad68e2abfa89f816f55fc093b439d
parente8f70dc762e1dff28f3b6813acc4bd1b78b63bb5 (diff)
downloadmesa-demos-9b7a91c9a72fbf33b6d7cd16316a2230ffba51b0.tar.gz
meson: hook up the unified-WSI eglut
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
-rw-r--r--src/egl/eglut/meson.build32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/egl/eglut/meson.build b/src/egl/eglut/meson.build
index f41a3f1f..4965b0f0 100644
--- a/src/egl/eglut/meson.build
+++ b/src/egl/eglut/meson.build
@@ -20,6 +20,38 @@
inc_glut = include_directories('.')
+eglut_files = files('eglut.c', 'wsi/wsi.c')
+wsi_deps = []
+wsi_args = []
+
+if dep_wayland.found()
+ wsi_args += ['-DWAYLAND_SUPPORT']
+ eglut_files += files('wsi/wayland.c')
+ wsi_deps += [dep_wayland, dep_epoll, dep_libdecor]
+endif
+
+if dep_x11.found()
+ wsi_args += ['-DX11_SUPPORT']
+ eglut_files += files('wsi/x11.c')
+ wsi_deps += dep_x11
+endif
+
+if wsi_deps.length() > 0
+ _libeglut = static_library(
+ 'eglut',
+ eglut_files,
+ dependencies: [dep_egl, wsi_deps],
+ c_args: wsi_args
+ )
+
+ idep_eglut = declare_dependency(
+ link_with: _libeglut,
+ include_directories: inc_glut
+ )
+else
+ idep_eglut = disabler()
+endif
+
_libeglut_x11 = static_library(
'eglut_x11',
files('eglut.c', 'eglut_x11.c'),