[libgnome-games-support/arnaudb/meson] fixup! Add Meson support.
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnome-games-support/arnaudb/meson] fixup! Add Meson support.
- Date: Mon, 28 Oct 2019 22:47:08 +0000 (UTC)
commit 65dff698b61bb56261424f1cfe3c3e6ba5eb1c31
Author: Jan Tojnar <jtojnar gmail com>
Date: Mon Oct 28 23:47:01 2019 +0100
fixup! Add Meson support.
games/meson.build | 36 ++++++++++++++++++++++++++++--------
meson.build | 1 +
tests/meson.build | 7 ++-----
3 files changed, 31 insertions(+), 13 deletions(-)
---
diff --git a/games/meson.build b/games/meson.build
index 831b56d..5771413 100644
--- a/games/meson.build
+++ b/games/meson.build
@@ -1,3 +1,12 @@
+includesubdir = 'gnome-games-support-1'
+
+lggs_interface_deps = [
+ gee_dependency,
+ gio_dependency,
+ glib_dependency,
+ gtk_dependency,
+]
+
lggs = library('libgnome-games-support-1',
[
'config.vapi',
@@ -12,8 +21,13 @@ lggs = library('libgnome-games-support-1',
],
name_prefix: '',
install: true,
- install_dir: [true, true, true], # default directories for header and vapi
+ install_dir: [
+ true, # default libdir
+ join_paths(includedir, includesubdir), # headers
+ true, # default vapidir
+ ],
c_args: [
+ # https://github.com/mesonbuild/meson/issues/4763
'-include', 'config.h'
],
vala_header: 'libgnome-games-support.h',
@@ -22,13 +36,19 @@ lggs = library('libgnome-games-support-1',
'--abi-stability',
'--target-glib', '2.44'
],
- dependencies: [
- gee_dependency,
- gio_dependency,
- glib_dependency,
- gtk_dependency
- ]
+ soversion: '3.0.1',
+ dependencies: lggs_interface_deps,
+)
+
+lggs_dependency = declare_dependency(
+ link_with: lggs,
+ include_directories: include_directories('.'),
)
pkg = import('pkgconfig')
-pkg.generate(lggs)
+pkg.generate(
+ lggs,
+ requires: lggs_interface_deps,
+ description: 'Useful functionality shared among GNOME games',
+ subdirs: includesubdir,
+)
diff --git a/meson.build b/meson.build
index 5f57735..5d4f469 100644
--- a/meson.build
+++ b/meson.build
@@ -19,6 +19,7 @@ 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'))
+includedir = join_paths(get_option('prefix'), get_option('includedir'))
conf = configuration_data ()
conf.set_quoted ('VERSION', meson.project_version())
diff --git a/tests/meson.build b/tests/meson.build
index 1fdcb68..396eab9 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,16 +1,13 @@
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
+ gtk_dependency,
+ lggs_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]