[gsettings-desktop-schemas/wip/carlosg/meson: 8/9] Add meson build system
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gsettings-desktop-schemas/wip/carlosg/meson: 8/9] Add meson build system
- Date: Fri, 7 Dec 2018 10:32:08 +0000 (UTC)
commit 03c8cb6b2d25b35af78eaac746c851f925f9d6c3
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Fri Nov 16 12:04:50 2018 +0100
Add meson build system
headers/meson.build | 18 ++++++++++++++++++
meson.build | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
meson_options.txt | 4 ++++
po/meson.build | 3 +++
schemas/meson.build | 41 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 117 insertions(+)
---
diff --git a/headers/meson.build b/headers/meson.build
new file mode 100644
index 0000000..4bd3b15
--- /dev/null
+++ b/headers/meson.build
@@ -0,0 +1,18 @@
+headers = files(
+ 'gdesktop-enums.h'
+)
+
+install_headers(headers, subdir: gsettings_desktop_schemas_name)
+
+if not meson.is_cross_build() and get_option('introspection')
+ gnome.generate_gir(
+ header: headers,
+ namespace: 'GDesktopEnums',
+ identifier_prefix: 'GDesktop',
+ nsversion : '3.0',
+ install: true,
+ extra_args: [
+ '--header-only',
+ ]
+ )
+endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..9e5812c
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,51 @@
+project(
+ 'gsettings-desktop-schemas', 'c',
+ version: '3.31.0',
+ default_options: [
+ 'warning_level=2'
+ ],
+ license: 'LGPL',
+ meson_version: '>= 0.46.0'
+)
+
+gsettings_desktop_schemas_name = meson.project_name()
+gsettings_desktop_schemas_version = meson.project_version()
+
+message('Building ' + gsettings_desktop_schemas_name + ' ' + gsettings_desktop_schemas_version)
+
+cc = meson.get_compiler('c')
+host_system = host_machine.system()
+arch = host_machine.cpu_family()
+
+prefix = get_option('prefix')
+bindir = join_paths(prefix, get_option('bindir'))
+libdir = join_paths(prefix, get_option('libdir'))
+libexecdir = join_paths(prefix, get_option('libexecdir'))
+includedir = join_paths(prefix, get_option('includedir'))
+datadir = join_paths(prefix, get_option('datadir'))
+sysconfdir = join_paths(prefix, get_option('sysconfdir'))
+schemasdir = join_paths(datadir, 'glib-2.0/schemas')
+
+conf = configuration_data()
+
+conf.set('prefix', prefix)
+conf.set('exec_prefix', prefix)
+conf.set('libdir', libdir)
+conf.set('bindir', bindir)
+conf.set('libexecdir', libexecdir)
+conf.set('datarootdir', datadir)
+conf.set('datadir', datadir)
+conf.set('includedir', includedir)
+
+gnome = import('gnome')
+
+# Generate pc file
+pkg = import('pkgconfig')
+
+pkg.generate(name: gsettings_desktop_schemas_name,
+ version: gsettings_desktop_schemas_version,
+ description: 'Shared GSettings schemas for the desktop, including helper headers')
+
+subdir('headers')
+subdir('schemas')
+subdir('po')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..d416715
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,4 @@
+option('introspection',
+ description: 'Whether to build introspection files',
+ type: 'boolean',
+ value: true)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..f756f30
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,3 @@
+i18n = import('i18n')
+
+i18n.gettext(gsettings_desktop_schemas_name, preset: 'glib')
diff --git a/schemas/meson.build b/schemas/meson.build
new file mode 100644
index 0000000..a176b29
--- /dev/null
+++ b/schemas/meson.build
@@ -0,0 +1,41 @@
+schemas_in = files(
+ 'org.gnome.desktop.default-applications.gschema.xml.in',
+ 'org.gnome.desktop.interface.gschema.xml.in',
+ 'org.gnome.desktop.lockdown.gschema.xml.in',
+ 'org.gnome.system.locale.gschema.xml.in',
+ 'org.gnome.system.location.gschema.xml.in',
+ 'org.gnome.system.proxy.gschema.xml.in',
+ 'org.gnome.desktop.sound.gschema.xml.in',
+ 'org.gnome.desktop.thumbnail-cache.gschema.xml.in',
+ 'org.gnome.desktop.a11y.gschema.xml.in',
+ 'org.gnome.desktop.a11y.keyboard.gschema.xml.in',
+ 'org.gnome.desktop.a11y.applications.gschema.xml.in',
+ 'org.gnome.desktop.a11y.magnifier.gschema.xml.in',
+ 'org.gnome.desktop.a11y.mouse.gschema.xml.in',
+ 'org.gnome.desktop.thumbnailers.gschema.xml.in',
+ 'org.gnome.desktop.session.gschema.xml.in',
+ 'org.gnome.desktop.background.gschema.xml.in',
+ 'org.gnome.desktop.calendar.gschema.xml.in',
+ 'org.gnome.desktop.datetime.gschema.xml.in',
+ 'org.gnome.desktop.media-handling.gschema.xml.in',
+ 'org.gnome.desktop.screensaver.gschema.xml.in',
+ 'org.gnome.desktop.search-providers.gschema.xml.in',
+ 'org.gnome.desktop.wm.keybindings.gschema.xml.in',
+ 'org.gnome.desktop.wm.preferences.gschema.xml.in',
+ 'org.gnome.desktop.input-sources.gschema.xml.in',
+ 'org.gnome.desktop.privacy.gschema.xml.in',
+ 'org.gnome.desktop.notifications.gschema.xml.in',
+ 'org.gnome.desktop.app-folders.gschema.xml.in',
+ 'org.gnome.desktop.peripherals.gschema.xml.in',
+)
+
+foreach schema: schemas_in
+ generated_schema = configure_file(
+ output: '@BASENAME@',
+ input: schema,
+ configuration: conf
+ )
+ install_data(generated_schema, install_dir: schemasdir)
+endforeach
+
+gnome.compile_schemas(build_by_default: true)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]