[libgnome-games-support/arnaudb/meson] Add Meson support.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnome-games-support/arnaudb/meson] Add Meson support.
- Date: Sun, 27 Oct 2019 14:29:30 +0000 (UTC)
commit 695125246901035449ab62e05d2453cf41f79b52
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Oct 25 23:17:33 2019 +0200
Add Meson support.
games/meson.build | 34 ++++++++++++++++++++++++++++++++++
meson.build | 32 ++++++++++++++++++++++++++++++++
po/meson.build | 1 +
tests/meson.build | 16 ++++++++++++++++
4 files changed, 83 insertions(+)
---
diff --git a/games/meson.build b/games/meson.build
new file mode 100644
index 0000000..831b56d
--- /dev/null
+++ b/games/meson.build
@@ -0,0 +1,34 @@
+lggs = library('libgnome-games-support-1',
+ [
+ 'config.vapi',
+ 'gridframe.vala',
+ 'scores/category.vala',
+ 'scores/context.vala',
+ 'scores/dialog.vala',
+ 'scores/directory-importer.vala',
+ 'scores/history-file-importer.vala',
+ 'scores/importer.vala',
+ 'scores/score.vala'
+ ],
+ name_prefix: '',
+ install: true,
+ install_dir: [true, true, true], # default directories for header and vapi
+ c_args: [
+ '-include', 'config.h'
+ ],
+ vala_header: 'libgnome-games-support.h',
+ vala_vapi: 'libgnome-games-support-1.vapi',
+ vala_args: [
+ '--abi-stability',
+ '--target-glib', '2.44'
+ ],
+ dependencies: [
+ gee_dependency,
+ gio_dependency,
+ glib_dependency,
+ gtk_dependency
+ ]
+)
+
+pkg = import('pkgconfig')
+pkg.generate(lggs)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..5f57735
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,32 @@
+project(
+ 'libgnome-games-support', ['vala', 'c'],
+ version: '1.4.4',
+ license: 'LGPLv3+',
+ meson_version: '>= 0.50.0',
+)
+
+# used to install help
+gnome = import('gnome')
+# used for internationalization
+i18n = import('i18n')
+
+cc = meson.get_compiler('c')
+valac = meson.get_compiler('vala') # TODO 0.39.6 min
+
+gee_dependency = dependency('gee-0.8', version: '>= 0.14.0')
+gio_dependency = dependency('gio-2.0', version: '>= 2.40.0')
+glib_dependency = dependency('glib-2.0', version: '>= 2.40.0')
+gtk_dependency = dependency('gtk+-3.0', version: '>= 3.19.2')
+
+localedir = join_paths(get_option('prefix'), get_option('localedir'))
+
+conf = configuration_data ()
+conf.set_quoted ('VERSION', meson.project_version())
+conf.set_quoted ('GETTEXT_PACKAGE', meson.project_name())
+conf.set_quoted ('LOCALEDIR', localedir)
+
+configure_file(output: 'config.h', configuration: conf)
+
+subdir('po')
+subdir('games')
+subdir('tests')
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..e9b77d7
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(meson.project_name(), preset: 'glib')
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..1fdcb68
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,16 @@
+lggs_tests = executable('libgnome-games-support-tests',
+ [ 'test-scores.vala' ],
+ c_args: [
+ '-include', join_paths(meson.build_root(), 'games', 'libgnome-games-support.h')
+ ],
+ vala_args: [
+ '--target-glib', '2.44'
+ ],
+ dependencies : [
+ gee_dependency,
+ glib_dependency,
+ gtk_dependency
+ ],
+ link_with: lggs
+)
+test('libgnome-games-support-tests', lggs_tests, timeout : 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]