From a7c3178f86afa016ddeed8ebbb668ec308b71122 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 23 Feb 2018 15:51:56 +0000 Subject: [PATCH] meson: Rename the configuration options The `enable-` prefix is an Autotool-ism; idiomatic naming for Meson projects should just use the name of the option, and rely on the type to convey meaning, especially because Meson does not have `disable` aliases that avoid the explicit `enable-foo=no` cases. --- .travis.yml | 5 +++-- meson.build | 6 +++--- meson_options.txt | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f6f50e3..0cfb469 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,5 +28,6 @@ before_script: script: - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh" - - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Denable-glx=no" - - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Denable-egl=no" + - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Dglx=no" + - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Degl=no" + - docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh -Dx11=false" diff --git a/meson.build b/meson.build index 2def595..9281ea5 100644 --- a/meson.build +++ b/meson.build @@ -34,7 +34,7 @@ conf.set('HAVE_KHRPLATFORM_H', cc.has_header('KHR/khrplatform.h', required: fals # configure time switch to enable or disable it; in case # the "auto" default value is set, we only enable GLX # support on Linux and Unix -enable_glx = get_option('enable-glx') +enable_glx = get_option('glx') if enable_glx == 'auto' if host_system == 'windows' build_glx = false @@ -53,7 +53,7 @@ elif enable_glx == 'no' build_glx = false endif -enable_egl = get_option('enable-egl') +enable_egl = get_option('egl') if enable_egl == 'auto' if host_system == 'windows' build_egl = false @@ -249,7 +249,7 @@ subdir('include/epoxy') subdir('src') subdir('test') -if get_option('enable-docs') +if get_option('docs') doxygen = find_program('doxygen', required: false) if doxygen.found() subdir('doc') diff --git a/meson_options.txt b/meson_options.txt index fc3371c..b5d7c98 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,12 +1,12 @@ -option('enable-docs', +option('docs', type: 'boolean', value: false, description: 'Enable generating the Epoxy API reference (depends on Doxygen)') -option('enable-glx', +option('glx', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto', description: 'Enable GLX support') -option('enable-egl', +option('egl', type: 'combo', choices: [ 'auto', 'yes', 'no' ], value: 'auto',