Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/meson.build b/meson.build
index d6ffa30d9e..117e8941d1 100644
--- a/meson.build
+++ b/meson.build
@@ -99,7 +99,7 @@ if _drivers == 'auto'
else
error('Unknown architecture. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
endif
- elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
+ elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
# only swrast would make sense here, but gallium swrast is a much better default
_drivers = ''
else
@@ -144,7 +144,7 @@ if _drivers == 'auto'
else
error('Unknown architecture. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
endif
- elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
+ elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
_drivers = 'swrast'
else
error('Unknown OS. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.')
@@ -181,7 +181,7 @@ if _vulkan_drivers == 'auto'
else
error('Unknown architecture. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.')
endif
- elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
+ elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
# No vulkan driver supports windows or macOS currently
_vulkan_drivers = ''
else
@@ -242,6 +242,8 @@ if _platforms == 'auto'
_platforms = 'x11,wayland,drm,surfaceless'
elif ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
_platforms = 'x11,surfaceless'
+ elif ['haiku'].contains(host_machine.system())
+ _platforms = 'haiku'
else
error('Unknown OS. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.')
endif
@@ -252,6 +254,7 @@ if _platforms != ''
with_platform_x11 = _split.contains('x11')
with_platform_wayland = _split.contains('wayland')
with_platform_drm = _split.contains('drm')
+ with_platform_haiku = _split.contains('haiku')
with_platform_surfaceless = _split.contains('surfaceless')
egl_native_platform = _split[0]
endif
@@ -260,6 +263,8 @@ with_glx = get_option('glx')
if with_glx == 'auto'
if with_dri
with_glx = 'dri'
+ elif with_platform_haiku
+ with_glx = 'disabled'
elif with_gallium
# Even when building just gallium drivers the user probably wants dri
with_glx = 'dri'
@@ -375,7 +380,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 or with_gallium
- if with_glx == 'disabled' and not with_egl
+ if with_glx == 'disabled' and not with_egl and not with_platform_haiku
error('building dri or gallium drivers require at least one window system')
endif
endif
@@ -1234,7 +1239,7 @@ if with_dri_platform == 'drm'
endif
gl_priv_libs = []
-if dep_thread.found()
+if dep_thread.found() and host_machine.system() != 'haiku'
gl_priv_libs += ['-lpthread', '-pthread']
endif
if dep_m.found()
diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build
index ea14654d2c..38a5747e9a 100644
--- a/src/mapi/es1api/meson.build
+++ b/src/mapi/es1api/meson.build
@@ -48,7 +48,7 @@ pkg.generate(
description : 'Mesa OpenGL ES 1.1 CM library',
version : meson.project_version(),
libraries : libglesv1_cm,
- libraries_private : '-lm -ldl -lpthread -pthread',
+ libraries_private : gl_priv_libs,
)
if with_tests
diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build
index de8a29bb6b..9f4770a738 100644
--- a/src/mapi/es2api/meson.build
+++ b/src/mapi/es2api/meson.build
@@ -48,7 +48,7 @@ pkg.generate(
description : 'Mesa OpenGL ES 2.0 library',
version : meson.project_version(),
libraries : libgles2,
- libraries_private : '-lm -ldl -lpthread -pthread',
+ libraries_private : gl_priv_libs,
)
if with_tests
diff --git a/src/meson.build b/src/meson.build
index 730b2ff6e4..4d5637f0aa 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -64,7 +64,12 @@ if with_dri_i965 or with_intel_vk
endif
subdir('mesa')
subdir('loader')
-subdir('glx')
+if with_platform_haiku
+ subdir('hgl')
+endif
+if with_glx != 'disabled'
+ subdir('glx')
+endif
if with_gbm
subdir('gbm')
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.