summaryrefslogtreecommitdiff
path: root/src/egl/meson.build
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-09-01 08:54:13 -0700
committerMarge Bot <eric+marge@anholt.net>2021-09-15 20:17:31 +0000
commite76db0f16514f0f7df88339e96697a0a24819162 (patch)
tree08513afd784cbf1fb53b25fa4af9752c2b4660b3 /src/egl/meson.build
parentb8a23fa89380c574c5f9fc84bc8fcaaa9e20313c (diff)
meson, egl: Support building for the Windows platform
Add a stub EGL driver for Windows Fix compiler issues in egl/main Ensure Windows build produces libEGL.dll Default EGL to enabled for Windows when building a Gallium driver Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed By: Bill Kristiansen <billkris@microsoft.com> Acked-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>
Diffstat (limited to 'src/egl/meson.build')
-rw-r--r--src/egl/meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/egl/meson.build b/src/egl/meson.build
index ab8f4e1fdbe..96bf322b8dc 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -140,6 +140,11 @@ elif with_platform_haiku
files_egl += files('drivers/haiku/egl_haiku.cpp')
link_for_egl += libgl
deps_for_egl += cpp.find_library('be')
+elif with_platform_windows
+ c_args_for_egl += [
+ '-DEGLAPI=', '-DPUBLIC='
+ ]
+ files_egl += files('drivers/wgl/egl_wgl.c')
endif
if cc.has_function('mincore')
@@ -149,9 +154,11 @@ endif
if not with_glvnd
egl_lib_name = 'EGL' + get_option('egl-lib-suffix')
egl_lib_version = '1.0.0'
+ egl_lib_soversion = host_machine.system() == 'windows' ? '' : '1'
else
egl_lib_name = 'EGL_@0@'.format(glvnd_vendor_name)
egl_lib_version = '0.0.0'
+ egl_lib_soversion = '0'
deps_for_egl += dep_glvnd
files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c]
files_egl += files('main/eglglvnd.c', 'main/egldispatchstubs.c')
@@ -181,6 +188,8 @@ libegl = shared_library(
dependencies : [deps_for_egl, dep_dl, dep_libdrm, dep_clock, dep_thread, idep_mesautil],
install : true,
version : egl_lib_version,
+ soversion : egl_lib_soversion,
+ name_prefix : 'lib', # even on windows
)
if not with_glvnd