summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2018-04-13 15:56:28 +0200
committerIñigo Martínez <inigomartinez@gmail.com>2018-04-13 16:16:45 +0200
commit46e17ef751add2003171579e982598104881d893 (patch)
tree62b24bb58852142461ee6887e988adb3d18358f1 /meson.build
parent3ea5ea754de2b7f3eb92785c0238dec162682114 (diff)
downloadlibsoup-46e17ef751add2003171579e982598104881d893.tar.gz
meson: Take advantage of short-circuit evaluation
Both `enable_gnome` and `enable_introspection` can take advantage of short-circuit evaluation to reduce meson parsing. https://bugzilla.gnome.org/show_bug.cgi?id=795233
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 2 insertions, 8 deletions
diff --git a/meson.build b/meson.build
index 1de92d72..5b710224 100644
--- a/meson.build
+++ b/meson.build
@@ -207,18 +207,12 @@ endif
#################
# GNOME support #
#################
-enable_gnome = get_option('gnome')
-if host_machine.system() == 'windows'
- enable_gnome = false
-endif
+enable_gnome = get_option('gnome') and host_machine.system() != 'windows'
#########################
# GObject introspection #
#########################
-enable_introspection = get_option('introspection')
-if enable_introspection
- enable_introspection = find_program('g-ir-scanner', required: false).found() and not meson.is_cross_build()
-endif
+enable_introspection = get_option('introspection') and find_program('g-ir-scanner', required: false).found() and not meson.is_cross_build()
############
# Vala API #