|
|
73b847 |
From c23e2719bac6d5b1c832ce06d4bc2358f532eb19 Mon Sep 17 00:00:00 2001
|
|
|
73b847 |
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
|
|
73b847 |
Date: Wed, 4 Dec 2019 12:32:14 +0100
|
|
|
73b847 |
Subject: [PATCH 069/181] meson: Use add_project_arguments for common cflags
|
|
|
73b847 |
|
|
|
73b847 |
We were passing around the common cflags and setting them for each library
|
|
|
73b847 |
or executable, but this is just a repetition given we can just use
|
|
|
73b847 |
add_project_arguments for this.
|
|
|
73b847 |
---
|
|
|
73b847 |
demo/meson.build | 5 +----
|
|
|
73b847 |
examples/meson.build | 6 ++----
|
|
|
73b847 |
libfprint/meson.build | 2 +-
|
|
|
73b847 |
meson.build | 13 ++++++++-----
|
|
|
73b847 |
4 files changed, 12 insertions(+), 14 deletions(-)
|
|
|
73b847 |
|
|
|
73b847 |
diff --git a/demo/meson.build b/demo/meson.build
|
|
|
73b847 |
index bf7a7ee..279a43c 100644
|
|
|
73b847 |
--- a/demo/meson.build
|
|
|
73b847 |
+++ b/demo/meson.build
|
|
|
73b847 |
@@ -13,10 +13,7 @@ executable('gtk-libfprint-test',
|
|
|
73b847 |
include_directories: [
|
|
|
73b847 |
root_inc,
|
|
|
73b847 |
],
|
|
|
73b847 |
- c_args: [
|
|
|
73b847 |
- common_cflags,
|
|
|
73b847 |
- '-DPACKAGE_VERSION="' + meson.project_version() + '"'
|
|
|
73b847 |
- ],
|
|
|
73b847 |
+ c_args: '-DPACKAGE_VERSION="' + meson.project_version() + '"',
|
|
|
73b847 |
install: true,
|
|
|
73b847 |
install_dir: bindir)
|
|
|
73b847 |
|
|
|
73b847 |
diff --git a/examples/meson.build b/examples/meson.build
|
|
|
73b847 |
index ff03ac6..eef8c3f 100644
|
|
|
73b847 |
--- a/examples/meson.build
|
|
|
73b847 |
+++ b/examples/meson.build
|
|
|
73b847 |
@@ -6,8 +6,7 @@ foreach example: examples
|
|
|
73b847 |
dependencies: [ libfprint_dep, glib_dep ],
|
|
|
73b847 |
include_directories: [
|
|
|
73b847 |
root_inc,
|
|
|
73b847 |
- ],
|
|
|
73b847 |
- c_args: common_cflags)
|
|
|
73b847 |
+ ])
|
|
|
73b847 |
endforeach
|
|
|
73b847 |
|
|
|
73b847 |
executable('cpp-test',
|
|
|
73b847 |
@@ -15,5 +14,4 @@ executable('cpp-test',
|
|
|
73b847 |
dependencies: libfprint_dep,
|
|
|
73b847 |
include_directories: [
|
|
|
73b847 |
root_inc,
|
|
|
73b847 |
- ],
|
|
|
73b847 |
- c_args: common_cflags)
|
|
|
73b847 |
+ ])
|
|
|
73b847 |
diff --git a/libfprint/meson.build b/libfprint/meson.build
|
|
|
73b847 |
index f77965a..964744e 100644
|
|
|
73b847 |
--- a/libfprint/meson.build
|
|
|
73b847 |
+++ b/libfprint/meson.build
|
|
|
73b847 |
@@ -188,7 +188,7 @@ libfprint = library('fprint',
|
|
|
73b847 |
drivers_sources + nbis_sources + other_sources,
|
|
|
73b847 |
soversion: soversion,
|
|
|
73b847 |
version: libversion,
|
|
|
73b847 |
- c_args: common_cflags + drivers_cflags,
|
|
|
73b847 |
+ c_args: drivers_cflags,
|
|
|
73b847 |
include_directories: [
|
|
|
73b847 |
root_inc,
|
|
|
73b847 |
include_directories('nbis/include'),
|
|
|
73b847 |
diff --git a/meson.build b/meson.build
|
|
|
73b847 |
index 54761c4..09abc1f 100644
|
|
|
73b847 |
--- a/meson.build
|
|
|
73b847 |
+++ b/meson.build
|
|
|
73b847 |
@@ -10,9 +10,6 @@ project('libfprint', [ 'c', 'cpp' ],
|
|
|
73b847 |
|
|
|
73b847 |
gnome = import('gnome')
|
|
|
73b847 |
|
|
|
73b847 |
-add_project_arguments([ '-D_GNU_SOURCE' ], language: 'c')
|
|
|
73b847 |
-add_project_arguments([ '-DG_LOG_DOMAIN="libfprint"' ], language: 'c')
|
|
|
73b847 |
-
|
|
|
73b847 |
libfprint_conf = configuration_data()
|
|
|
73b847 |
|
|
|
73b847 |
cc = meson.get_compiler('c')
|
|
|
73b847 |
@@ -23,8 +20,6 @@ glib_min_version = '2.56'
|
|
|
73b847 |
glib_version_def = 'GLIB_VERSION_@0@_@1@'.format(
|
|
|
73b847 |
glib_min_version.split('.')[0], glib_min_version.split('.')[1])
|
|
|
73b847 |
common_cflags = cc.get_supported_arguments([
|
|
|
73b847 |
- '-fgnu89-inline',
|
|
|
73b847 |
- '-std=gnu99',
|
|
|
73b847 |
'-Wall',
|
|
|
73b847 |
'-Wtype-limits',
|
|
|
73b847 |
'-Wundef',
|
|
|
73b847 |
@@ -34,7 +29,15 @@ common_cflags = cc.get_supported_arguments([
|
|
|
73b847 |
'-Wshadow',
|
|
|
73b847 |
'-DGLIB_VERSION_MIN_REQUIRED=' + glib_version_def,
|
|
|
73b847 |
'-DGLIB_VERSION_MAX_ALLOWED=' + glib_version_def,
|
|
|
73b847 |
+ '-D_GNU_SOURCE',
|
|
|
73b847 |
+ '-DG_LOG_DOMAIN="libfprint"',
|
|
|
73b847 |
+])
|
|
|
73b847 |
+c_cflags = cc.get_supported_arguments([
|
|
|
73b847 |
+ '-fgnu89-inline',
|
|
|
73b847 |
+ '-std=gnu99',
|
|
|
73b847 |
])
|
|
|
73b847 |
+add_project_arguments(common_cflags + c_cflags, language: 'c')
|
|
|
73b847 |
+add_project_arguments(common_cflags, language: 'cpp')
|
|
|
73b847 |
|
|
|
73b847 |
# maintaining compatibility with the previous libtool versioning
|
|
|
73b847 |
# current = binary - interface
|
|
|
73b847 |
--
|
|
|
73b847 |
2.24.1
|
|
|
73b847 |
|