[devhelp] meson: start to implement the build system with Meson
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] meson: start to implement the build system with Meson
- Date: Sun, 11 Mar 2018 17:49:00 +0000 (UTC)
commit 9000dfb5c76aaf4160c0469560fc70be004e409e
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Mar 10 20:27:19 2018 +0100
meson: start to implement the build system with Meson
Thanks to Iñigo Martínez for the initial patch.
build/.gitignore | 1 +
devhelp/meson.build | 13 +++++++++
meson.build | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/build/.gitignore b/build/.gitignore
new file mode 100644
index 0000000..72e8ffc
--- /dev/null
+++ b/build/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/devhelp/meson.build b/devhelp/meson.build
new file mode 100644
index 0000000..58a57fe
--- /dev/null
+++ b/devhelp/meson.build
@@ -0,0 +1,13 @@
+libdevhelp_public_headers = [
+ 'dh-completion.h'
+]
+
+libdevhelp_public_c_files = [
+ 'dh-completion.c'
+]
+
+library('devhelp-3',
+ [libdevhelp_public_headers,
+ libdevhelp_public_c_files],
+ dependencies : DEVHELP_DEPS,
+ install : true)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..0e0ae50
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,75 @@
+# Convention:
+# - Local variables in lower_case.
+# - Global variables in UPPER_CASE.
+# See: https://github.com/mesonbuild/meson/issues/2607
+
+project('devhelp', 'c',
+ meson_version : '>= 0.43',
+ version : '3.28.1')
+
+DEVHELP_DEPS = [
+ dependency('gio-2.0', version : '>= 2.40'),
+ dependency('gtk+-3.0', version : '>= 3.22'),
+ dependency('webkit2gtk-4.0', version : '>= 2.19.2'),
+ dependency('gsettings-desktop-schemas')
+]
+
+add_global_arguments('-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
+ language : 'c')
+
+#####
+# CFLAGS
+# (This is one of the ugly parts of Meson, currently.)
+# The same as the AX_COMPILER_FLAGS Autotools macro.
+
+warning_cflags = [
+ '-fno-strict-aliasing',
+ '-Wall',
+ '-Wextra',
+ '-Wundef',
+ '-Wnested-externs',
+ '-Wwrite-strings',
+ '-Wpointer-arith',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wstrict-prototypes',
+ '-Wredundant-decls',
+ '-Wno-unused-parameter',
+ '-Wno-missing-field-initializers',
+ '-Wdeclaration-after-statement',
+ '-Wformat=2',
+ '-Wold-style-definition',
+ '-Wcast-align',
+ '-Wformat-nonliteral',
+ '-Wformat-security',
+ '-Wsign-compare',
+ '-Wstrict-aliasing',
+ '-Wshadow',
+ '-Winline',
+ '-Wpacked',
+ '-Wmissing-format-attribute',
+ '-Wmissing-noreturn',
+ '-Winit-self',
+ '-Wredundant-decls',
+ '-Wmissing-include-dirs',
+ '-Wunused-but-set-variable',
+ '-Warray-bounds',
+ '-Wimplicit-function-declaration',
+ '-Wreturn-type',
+ '-Wswitch-enum',
+ '-Wswitch-default',
+ '-Wduplicated-cond',
+ '-Wduplicated-branches',
+ '-Wlogical-op',
+ '-Wrestrict',
+ '-Wnull-dereference',
+ '-Wjump-misses-init',
+ '-Wdouble-promotion'
+]
+
+c_compiler = meson.get_compiler('c')
+supported_warning_cflags = c_compiler.get_supported_arguments(warning_cflags)
+add_global_arguments(supported_warning_cflags, language : 'c')
+##### end CFLAGS
+
+subdir('devhelp')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]