[seahorse] Meson: put flags after dependencies.
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Meson: put flags after dependencies.
- Date: Wed, 22 Nov 2017 00:28:01 +0000 (UTC)
commit 4d1c509ba1530f13b50b0c5b6ae35cd2ef98a8c5
Author: Niels De Graef <nielsdegraef gmail com>
Date: Wed Nov 22 01:26:01 2017 +0100
Meson: put flags after dependencies.
* Add `--target-glib` flag based on `glib_min_version`
* Remove C flag `-Wchar-subscripts` as it is enabled by `-Wall`
meson.build | 69 +++++++++++++++++++++++++++++++---------------------------
1 files changed, 37 insertions(+), 32 deletions(-)
---
diff --git a/meson.build b/meson.build
index 52958c5..ae30696 100644
--- a/meson.build
+++ b/meson.build
@@ -29,38 +29,6 @@ pkgdatadir = join_paths(datadir, meson.project_name())
libexecbindir = join_paths(seahorse_prefix, get_option('libexecdir'), meson.project_name())
localedir = join_paths(seahorse_prefix, get_option('localedir'))
-# Project-wide flags
-add_project_arguments([
- '-DGCR_API_SUBJECT_TO_CHANGE',
- '-DGCK_API_SUBJECT_TO_CHANGE',
- '-include', 'config.h',
- ],
- language: 'c',
-)
-
-# Use more warnings
-warning_flags = [
- '-Wchar-subscripts',
- '-Wmissing-declarations',
- '-Wmissing-prototypes',
- '-Wnested-externs',
- '-Wpointer-arith',
- '-Wcast-align',
- '-Wsign-compare',
- '-Wno-deprecated-declarations',
- '-Wno-strict-aliasing',
- '-Wno-sign-compare',
-]
-supported_warning_flags = []
-foreach flag : warning_flags
- if cc.has_argument(flag)
- supported_warning_flags += flag
- endif
-endforeach
-add_project_arguments(supported_warning_flags,
- language: 'c',
-)
-
# Dependencies
min_glib_version = '2.44'
min_gcr_version = '3.11.91'
@@ -121,6 +89,43 @@ avahi_client = dependency('avahi-client', required: with_key_sharing)
avahi_glib = dependency('avahi-glib', version: '>= 0.6', required: with_key_sharing)
+# Project-wide flags
+add_project_arguments([
+ '--target-glib=@0@'.format(min_glib_version),
+ ],
+ language: 'vala',
+)
+add_project_arguments([
+ '-DGCR_API_SUBJECT_TO_CHANGE',
+ '-DGCK_API_SUBJECT_TO_CHANGE',
+ '-include', 'config.h',
+ ],
+ language: 'c',
+)
+
+# Use more warnings
+warning_flags = [
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wpointer-arith',
+ '-Wcast-align',
+ '-Wsign-compare',
+ '-Wno-deprecated-declarations',
+ '-Wno-strict-aliasing',
+ '-Wno-sign-compare',
+]
+supported_warning_flags = []
+foreach flag : warning_flags
+ if cc.has_argument(flag)
+ supported_warning_flags += flag
+ endif
+endforeach
+add_project_arguments(supported_warning_flags,
+ language: 'c',
+)
+
+
# configuration
conf = configuration_data()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]