summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@imgtec.com>2018-03-13 12:21:14 +0000
committerEric Engestrom <eric.engestrom@imgtec.com>2018-03-13 17:16:31 +0000
commit5f151684da33fadab3a0cd3270c99a8908ca2056 (patch)
treec2097b20643f9b2686ba366a246d3a98dce42da7 /meson.build
parent500f522d47a242e97d05ce2d5d9e44e410ed7b98 (diff)
downloadlibepoxy-5f151684da33fadab3a0cd3270c99a8908ca2056.tar.gz
meson: simplify build_{glx,egl} logic
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build34
1 files changed, 6 insertions, 28 deletions
diff --git a/meson.build b/meson.build
index a1cec5b..89da132 100644
--- a/meson.build
+++ b/meson.build
@@ -36,38 +36,16 @@ conf.set('HAVE_KHRPLATFORM_H', cc.has_header('KHR/khrplatform.h', required: fals
# support on Linux and Unix
enable_glx = get_option('glx')
if enable_glx == 'auto'
- if host_system == 'windows'
- build_glx = false
- elif host_system == 'darwin'
- build_glx = false
- elif host_system == 'android'
- build_glx = false
- elif host_system == 'haiku'
- build_glx = false
- else
- build_glx = true
- endif
-elif enable_glx == 'yes'
- build_glx = true
-elif enable_glx == 'no'
- build_glx = false
+ build_glx = not ['windows', 'darwin', 'android', 'haiku'].contains(host_system)
+else
+ build_glx = enable_glx == 'yes'
endif
enable_egl = get_option('egl')
if enable_egl == 'auto'
- if host_system == 'windows'
- build_egl = false
- elif host_system == 'darwin'
- build_egl = false
- elif host_system == 'android'
- build_egl = true
- else
- build_egl = true
- endif
-elif enable_egl == 'yes'
- build_egl = true
-elif enable_egl == 'no'
- build_egl = false
+ build_egl = not ['windows', 'darwin'].contains(host_system)
+else
+ build_egl = enable_egl == 'yes'
endif
enable_x11 = get_option('x11')