[gnome-documents] build: Improve introspection generation
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] build: Improve introspection generation
- Date: Thu, 15 Mar 2018 21:46:07 +0000 (UTC)
commit 0144d8c913113746d14b5e5a9a03239337affe02
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Thu Mar 15 08:32:23 2018 +0100
build: Improve introspection generation
Introspection generation build commands have been improved by
creating variables for gnome-documents namespace, which are reused,
and replacing GIR and Typelib paths variables by their values as
they are used only once.
https://bugzilla.gnome.org/show_bug.cgi?id=787013
meson.build | 3 +++
src/meson.build | 22 +++++++---------------
2 files changed, 10 insertions(+), 15 deletions(-)
---
diff --git a/meson.build b/meson.build
index 276e17c..54be695 100644
--- a/meson.build
+++ b/meson.build
@@ -8,6 +8,9 @@ project(
documents_version = meson.project_version()
+documents_ns = 'Gd'
+documents_private_ns = documents_ns + 'Private'
+
documents_api_version = '1.0'
documents_gir_version = '1.0'
diff --git a/src/meson.build b/src/meson.build
index de37eef..4c341a1 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -130,7 +130,7 @@ cflags = [
]
libgdprivate = shared_library(
- 'gdprivate-' + documents_api_version,
+ '@0@-@1@'.format(documents_private_ns.to_lower(), documents_api_version),
sources: sources,
include_directories: incs,
dependencies: documents_deps,
@@ -139,8 +139,6 @@ libgdprivate = shared_library(
install_dir: documents_pkglibdir
)
-gir_sources = sources + headers
-
gir_incs = [
'GData-0.0',
'GnomeDesktop-3.0',
@@ -151,21 +149,15 @@ gir_incs = [
'Zpj-0.0'
]
-gir_extra_args = '--warn-all'
-
-gir_dir = join_paths(documents_pkgdatadir, 'gir-' + documents_gir_version)
-typelib_dir = join_paths(documents_pkglibdir, 'girepository-' + documents_gir_version)
-
gnome.generate_gir(
libgdprivate,
- sources: gir_sources,
+ sources: sources + headers,
nsversion: documents_api_version,
- namespace: 'GdPrivate',
- identifier_prefix: 'Gd',
- symbol_prefix: 'gd',
+ namespace: documents_private_ns,
+ identifier_prefix: documents_ns,
+ symbol_prefix: documents_ns.to_lower(),
includes: gir_incs,
install: true,
- install_dir_gir: gir_dir,
- install_dir_typelib: typelib_dir,
- extra_args: gir_extra_args
+ install_dir_gir: join_paths(documents_pkgdatadir, 'gir-' + documents_gir_version),
+ install_dir_typelib: join_paths(documents_pkglibdir, 'girepository-' + documents_gir_version)
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]