diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-09-12 23:41:05 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-09-12 23:45:42 +0200 |
commit | d3e8c45511ed93116745667abfae02bee4b3a150 (patch) | |
tree | 5308e29d44a863b5b6063253ba72f016fb0e4aef | |
parent | 854cfe77cdc62206a619986a97391b59a2464a21 (diff) | |
download | gnome-desktop-d3e8c45511ed93116745667abfae02bee4b3a150.tar.gz |
Meson: fix preprocessor directives.
When using `#ifdef` in your code (vs `#if`), the C preprocessor doesn't
check the value of the macro, only whether it is defined at all.
By using `conf.set10()`, the macros were defined, whether the
boolean values in the meson build file were false or not. So, to fix
this, you either have to start using `#if`, or you make sure you use
`conf.set()` instead.
This fixes the flatpak build of GNOME Contacts (which turns off udev
support).
-rw-r--r-- | meson.build | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meson.build b/meson.build index c30395e0..2fd34104 100644 --- a/meson.build +++ b/meson.build @@ -78,14 +78,14 @@ conf = configuration_data() conf.set_quoted('GETTEXT_PACKAGE', '@0@-3.0'.format(meson.project_name())) conf.set_quoted('INSTALL_PREFIX', prefix) -conf.set10('ENABLE_SECCOMP', seccomp_dep.found()) -conf.set10('HAVE_BWRAP', seccomp_dep.found()) -conf.set10('_GNU_SOURCE', seccomp_dep.found()) +conf.set('ENABLE_SECCOMP', seccomp_dep.found()) +conf.set('HAVE_BWRAP', seccomp_dep.found()) +conf.set('_GNU_SOURCE', seccomp_dep.found()) -conf.set10('HAVE_UDEV', udev_dep.found()) +conf.set('HAVE_UDEV', udev_dep.found()) -conf.set10('HAVE_TIMERFD', cc.has_function('timerfd_create')) -conf.set10('HAVE_OPENAT', cc.has_function('openat')) +conf.set('HAVE_TIMERFD', cc.has_function('timerfd_create')) +conf.set('HAVE_OPENAT', cc.has_function('openat')) config_h = declare_dependency( sources: configure_file( |