[gnome-builder/wip/tingping/meson-build] fixup! build: Initial conversion to Meson
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/tingping/meson-build] fixup! build: Initial conversion to Meson
- Date: Sun, 2 Oct 2016 16:22:38 +0000 (UTC)
commit 96bdccf83b2b342f7df164507fcb6dc5aa5a3fd5
Author: Patrick Griffis <tingping tingping se>
Date: Sun Oct 2 12:22:12 2016 -0400
fixup! build: Initial conversion to Meson
contrib/egg/meson.build | 22 +++++++++++++--
contrib/gd/meson.build | 1 -
contrib/pnl/meson.build | 23 ++++++++++++++-
contrib/tmpl/meson.build | 60 +++++++++++++++++++++++++++++++++-------
contrib/tmpl/tmpl-enums.h.in | 3 +-
libide/meson.build | 62 +++++++++++++++++++++++++++--------------
meson.build | 2 +
meson_options.txt | 1 +
8 files changed, 136 insertions(+), 38 deletions(-)
---
diff --git a/contrib/egg/meson.build b/contrib/egg/meson.build
index fdac301..e2dda86 100644
--- a/contrib/egg/meson.build
+++ b/contrib/egg/meson.build
@@ -33,11 +33,10 @@ libegg_headers = [
]
install_headers(libegg_headers,
- subdir: 'gnome-builder' + meson.project_version() + '/egg'
+ subdir: 'gnome-builder-' + meson.project_version() + '/egg'
)
libegg_resources = gnome.compile_resources('egg-resources', 'egg.gresource.xml',
- source_dir: meson.current_source_dir(),
c_name: 'egg',
)
@@ -72,7 +71,8 @@ libegg_sources = [
'egg-task-cache.c',
'egg-three-grid.c',
'egg-widget-action-group.c',
- libegg_resources,
+ libegg_resources[0],
+ libegg_resources[1]
]
libegg_deps = [
@@ -85,3 +85,19 @@ libegg = shared_library('libegg', libegg_sources,
install: true,
install_dir: get_option('libdir') + '/gnome-builder',
)
+
+if get_option('with_introspection')
+
+gnome.generate_gir(libegg,
+ sources: libegg_sources + libegg_headers,
+ nsversion: '1.0',
+ namespace: 'Egg',
+ symbol_prefix: 'egg',
+ identifier_prefix: 'Egg',
+ includes: ['Gtk-3.0'],
+ install: true,
+ install_dir_gir: get_option('datadir') + '/gnome-builder/gir-1.0',
+ install_dir_typelib: get_option('datadir') + '/gnome-builder/girepository-1.0',
+)
+
+endif
diff --git a/contrib/gd/meson.build b/contrib/gd/meson.build
index 7eb5c1f..43f930f 100644
--- a/contrib/gd/meson.build
+++ b/contrib/gd/meson.build
@@ -1,6 +1,5 @@
libgd_resources = gnome.compile_resources('gd-resources',
'gd-tagged-entry.gresource.xml',
- source_dir: meson.current_source_dir(),
c_name: 'gd',
)
diff --git a/contrib/pnl/meson.build b/contrib/pnl/meson.build
index 9c38db2..a9c1d02 100644
--- a/contrib/pnl/meson.build
+++ b/contrib/pnl/meson.build
@@ -26,7 +26,6 @@ install_headers(libpnl_headers,
libpnl_resources = gnome.compile_resources('pnl-resources',
'pnl.gresource.xml',
- source_dir: meson.current_source_dir(),
c_name: 'pnl',
)
@@ -57,7 +56,8 @@ libpnl_sources = [
'pnl-tab.c',
'pnl-util-private.h',
'pnl-util.c',
- libpnl_resources,
+ libpnl_resources[0],
+ libpnl_resources[1],
]
libpnl_deps = [
@@ -70,3 +70,22 @@ libpnl = shared_library('pnl', libpnl_sources,
install: true,
install_dir: get_option('libdir') + '/gnome-builder',
)
+
+if get_option('with_introspection')
+
+gnome.generate_gir(libpnl,
+ sources: libpnl_sources + libpnl_headers,
+ nsversion: '1.0',
+ namespace: 'Pnl',
+ symbol_prefix: 'pnl',
+ identifier_prefix: 'Pnl',
+ includes: ['Gtk-3.0'],
+ install: true,
+ install_dir_gir: get_option('datadir') + '/gnome-builder/gir-1.0',
+ install_dir_typelib: get_option('datadir') + '/gnome-builder/girepository-1.0',
+ extra_args: [
+ '-DPNL_COMPILATION',
+ ],
+)
+
+endif
diff --git a/contrib/tmpl/meson.build b/contrib/tmpl/meson.build
index 35d3dc1..5ce84a7 100644
--- a/contrib/tmpl/meson.build
+++ b/contrib/tmpl/meson.build
@@ -1,3 +1,14 @@
+libtmpl_enum_headers = [
+ 'tmpl-error.h',
+ 'tmpl-expr-types.h',
+]
+
+gnome.mkenums('tmpl-enums',
+ h_template: 'tmpl-enums.h.in',
+ c_template: 'tmpl-enums.c.in',
+ sources: libtmpl_enum_headers,
+)
+
libtmpl_headers = [
'tmpl-error.h',
'tmpl-expr-types.h',
@@ -10,26 +21,18 @@ libtmpl_headers = [
'tmpl-enums.h',
]
-libtmpl_enum_headers = [
- 'tmpl-error.h',
- 'tmpl-expr-types.h',
-]
-
-gnome.mkenums('tmpl-enums',
- sources: libtmpl_enum_headers,
-)
-
install_headers(libtmpl_headers,
subdir: 'gnome-builder-' + meson.project_version() + '/template-glib',
)
-libtmpl_sources = [
+libtmpl_sources = libtmpl_headers + [
'tmpl-branch-node.c',
'tmpl-branch-node.h',
'tmpl-condition-node.c',
'tmpl-condition-node.h',
'tmpl-debug.h',
'tmpl-error.c',
+ 'tmpl-enums.c',
'tmpl-expr-eval.c',
'tmpl-expr-node.c',
'tmpl-expr-node.h',
@@ -91,3 +94,40 @@ libtmpl = shared_library('tmpl', libtmpl_sources,
install: true,
install_dir: pkglibdir, # Was this the wrong dir?
)
+
+if get_option('with_introspection')
+
+libtmpl_introspection_sources = [
+ 'tmpl-enums.c',
+ 'tmpl-enums.h',
+ 'tmpl-error.c',
+ 'tmpl-error.h',
+ 'tmpl-expr.c',
+ 'tmpl-expr.h',
+ 'tmpl-expr-types.h',
+ 'tmpl-scope.c',
+ 'tmpl-scope.h',
+ 'tmpl-symbol.c',
+ 'tmpl-symbol.h',
+ 'tmpl-template-locator.c',
+ 'tmpl-template-locator.h',
+ 'tmpl-template.c',
+ 'tmpl-template.h',
+]
+
+libtmpl_gir = gnome.generate_gir(libtmpl,
+ sources: libtmpl_introspection_sources,
+ nsversion: '1.0',
+ namespace: 'Template',
+ symbol_prefix: 'tmpl',
+ identifier_prefix: 'Tmpl',
+ includes: ['Gio-2.0'],
+ install: true,
+ install_dir_gir: get_option('datadir') + '/gnome-builder/gir-1.0',
+ install_dir_typelib: get_option('datadir') + '/gnome-builder/girepository-1.0',
+ extra_args: [
+ '-DTMPL_GLIB_COMPILATION',
+ ]
+)
+
+endif
diff --git a/contrib/tmpl/tmpl-enums.h.in b/contrib/tmpl/tmpl-enums.h.in
index 3722cdc..ea36434 100644
--- a/contrib/tmpl/tmpl-enums.h.in
+++ b/contrib/tmpl/tmpl-enums.h.in
@@ -3,6 +3,7 @@
#define __IDE_ENUMS_H__
#include <glib-object.h>
+#include <gmodule.h>
G_BEGIN_DECLS
/*** END file-header ***/
@@ -13,7 +14,7 @@ G_BEGIN_DECLS
/*** END file-production ***/
/*** BEGIN value-header ***/
-GType @enum_name@_get_type (void);
+G_MODULE_EXPORT GType @enum_name@_get_type (void) G_GNUC_CONST;
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
/*** END value-header ***/
diff --git a/libide/meson.build b/libide/meson.build
index 60e3c48..6317130 100644
--- a/libide/meson.build
+++ b/libide/meson.build
@@ -1,3 +1,26 @@
+libide_enum_headers = [
+ 'buffers/ide-buffer.h',
+ 'buildsystem/ide-build-result.h',
+ 'devices/ide-device.h',
+ 'diagnostics/ide-diagnostic.h',
+ 'doap/ide-doap.h',
+ 'files/ide-indent-style.h',
+ 'highlighting/ide-highlighter.h',
+ 'runtimes/ide-runtime.h',
+ 'sourceview/ide-source-view.h',
+ 'symbols/ide-symbol.h',
+ 'threading/ide-thread-pool.h',
+ 'vcs/ide-vcs-config.h',
+ 'workbench/ide-layout-stack-split.h',
+]
+
+# https://github.com/mesonbuild/meson/pull/718
+libide_enums = gnome.mkenums('ide-enums',
+ h_template: 'ide-enums.h.in',
+ c_template: 'ide-enums.c.in',
+ sources: libide_enum_headers,
+)
+
libide_public_headers = [
'ide-context.h',
'ide-debug.h',
@@ -163,27 +186,6 @@ libide_public_headers = [
'workers/ide-worker.h',
]
-libide_enum_headers = [
- 'buffers/ide-buffer.h',
- 'buildsystem/ide-build-result.h',
- 'devices/ide-device.h',
- 'diagnostics/ide-diagnostic.h',
- 'doap/ide-doap.h',
- 'files/ide-indent-style.h',
- 'highlighting/ide-highlighter.h',
- 'runtimes/ide-runtime.h',
- 'sourceview/ide-source-view.h',
- 'symbols/ide-symbol.h',
- 'threading/ide-thread-pool.h',
- 'vcs/ide-vcs-config.h',
- 'workbench/ide-layout-stack-split.h',
-]
-
-# https://github.com/mesonbuild/meson/pull/718
-libide_enums = gnome.mkenums('libide-enums',
- sources: libide_enum_headers,
-)
-
install_headers(libide_public_headers,
subdir: 'gnome-builder-' + meson.project_version() + '/libide'
)
@@ -549,3 +551,21 @@ libide = shared_library('ide', libide_sources,
install: true,
install_dir: get_option('libdir') + '/gnome-builder',
)
+
+if get_option('with_introspection')
+
+gnome.generate_gir(libide,
+ sources: libide_public_headers + libide_public_sources,
+ nsversion: '1.0',
+ namespace: 'Ide',
+ symbol_prefix: 'ide',
+ identifier_prefix: 'Ide',
+ includes: ['Gio-2.0', 'Gtk-3.0', 'GtkSource-3.0', 'Peas-1.0', libtmpl_gir[0]],
+ export_packages: 'ide-1.0',
+ install: true,
+ install_dir_gir: get_option('datadir') + '/gnome-builder/gir-1.0',
+ install_dir_typelib: get_option('datadir') + '/gnome-builder/girepository-1.0',
+
+)
+
+endif
diff --git a/meson.build b/meson.build
index 595af99..4e149a7 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,7 @@
project('gnome-builder', 'c',
license: 'GPL3+',
version: '3.22.0',
+ meson_version: '>=0.35.0',
# https://github.com/mesonbuild/meson/pull/834
default_options: ['b_lundef=false'],
)
@@ -39,6 +40,7 @@ configure_file(
)
pkglibdir = get_option('libdir') + '/gnome-builder'
+pkggirdir = get_option('datadir') + '/gnome-builder/gir-1.0'
gnome = import('gnome')
subdir('contrib/egg')
diff --git a/meson_options.txt b/meson_options.txt
index b0704b5..6d22361 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,3 +6,4 @@ option('enable_profiling', type: 'boolean', value: false)
option('with_editorconfig', type: 'boolean')
option('with_webkit', type: 'boolean')
+option('with_introspection', type: 'boolean')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]