vcpkg/ports/mesa/dual-osmesa.patch
Alexander Neumann 9c63f97fa1
[mesa] new port (#14640)
* [mesa] new port

* make mesa build more.

* more fine tuning

* fix x86

* add supports.

* comment about EGL feature.

* apply suggestion from CR.
added opengl feature.
error on disabled shared glapi if multiple GL APIs are selected.

* fix boolean option

* make sharedgl-api=true the hardcoded default

* add suggestion from CR

* add mesa:x64-windows-static=fail to ci.baseline.txt due to static crt and parts being a dynamic library.

* apply CR sugesstion

Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
2021-01-11 16:12:01 -08:00

81 lines
2.4 KiB
Diff

diff --git a/include/meson.build b/include/meson.build
index a64d9373a92..22c50eb5eb7 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -89,7 +89,7 @@ if with_egl
)
endif
-if with_osmesa != 'none'
+if with_osmesa != []
install_headers('GL/osmesa.h', subdir : 'GL')
endif
diff --git a/meson.build b/meson.build
index 898d025f066..d73818e7ce5 100644
--- a/meson.build
+++ b/meson.build
@@ -444,7 +444,7 @@ if with_any_vk and (with_platform_x11 and not with_dri3)
error('Vulkan drivers require dri3 for X11 support')
endif
if with_dri
- if with_glx == 'disabled' and not with_egl and not with_gbm and with_osmesa != 'classic'
+ if with_glx == 'disabled' and not with_egl and not with_gbm and not with_osmesa.contains('classic')
error('building dri drivers require at least one windowing system or classic osmesa')
endif
endif
@@ -1508,8 +1508,8 @@ else
dep_unwind = null_dep
endif
-if with_osmesa != 'none'
- if with_osmesa == 'gallium' and not with_gallium_softpipe
+if with_osmesa != []
+ if with_osmesa.contains('gallium') and not with_gallium_softpipe
error('OSMesa gallium requires gallium softpipe or llvmpipe.')
endif
if host_machine.system() == 'windows'
@@ -1710,10 +1710,10 @@ lines = ['',
with_gles2 ? 'yes' : 'no'),
]
-if with_osmesa != 'none'
+if with_osmesa != []
lines += ''
suffix = ''
- if with_osmesa == 'gallium'
+ if with_osmesa.contains('gallium')
suffix = '(Gallium)'
endif
lines += 'OSMesa: lib' + osmesa_lib_name + suffix
diff --git a/meson_options.txt b/meson_options.txt
index 626baf3d5c2..cb3dc3b383f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -295,9 +295,9 @@ option(
)
option(
'osmesa',
- type : 'combo',
- value : 'none',
- choices : ['none', 'classic', 'gallium'],
+ type : 'array',
+ value : [],
+ choices : ['classic', 'gallium'],
description : 'Build OSmesa.'
)
option(
diff --git a/src/mesa/meson.build b/src/mesa/meson.build
index fa5c54cc6fb..f7b223862fa 100644
--- a/src/mesa/meson.build
+++ b/src/mesa/meson.build
@@ -744,7 +744,7 @@ libmesa_gallium = static_library(
)
subdir('drivers/dri')
-if with_osmesa == 'classic'
+if with_osmesa.contains('classic')
subdir('drivers/osmesa')
endif
if with_glx == 'xlib'