diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-10-27 17:20:52 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-11-22 12:47:43 -0800 |
commit | 33627d23d03ee6273c5aa874a85978777271582f (patch) | |
tree | e3398feaefbc0ccc86b1634748269c6e604ec88d /meson.build | |
parent | 2d1a3bf657281509b3f602f71c9d9821b72675e4 (diff) |
meson: add logic to select apple and windows dri
This is still not fully correct (haiku and BSD is notably probably not
correct), but Linux is not regressed and this should be correct for
macOS and Windows.
v2: - set the dri_platform to windows on Cygwin as well (Jon)
v3: - Add a better todo for Hurd (Eric)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/meson.build b/meson.build index cba08682bc..d5a7c62266 100644 --- a/meson.build +++ b/meson.build @@ -187,8 +187,20 @@ if with_dri_i915 dep_libdrm_intel = dependency('libdrm_intel', version : '>= 2.4.75') endif -# TODO: other OSes -with_dri_platform = 'drm' +if host_machine.system() == 'darwin' + with_dri_platform = 'apple' +elif ['windows', 'cygwin'].contains(host_machine.system()) + with_dri_platform = 'windows' +elif host_machine.system() == 'linux' + # FIXME: This should include BSD and possibly other systems + with_dri_platform = 'drm' +else + # FIXME: haiku doesn't use dri, and xlib doesn't use dri, probably should + # assert here that one of those cases has been met. + # FIXME: GNU (hurd) ends up here as well, but meson doesn't officially + # support Hurd at time of writing (2017/11) + with_dri_platform = 'none' +endif with_platform_android = false with_platform_wayland = false |