[gnome-clocks/wip/meson] build: add meson build system
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/wip/meson] build: add meson build system
- Date: Tue, 27 Dec 2016 13:22:39 +0000 (UTC)
commit 659623aaff8d02006360ee5073085f8c4b928625
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Dec 27 10:34:02 2016 +0100
build: add meson build system
WIP. Current TODO list:
- icons must call gtk update icon cache
- other data files (.desktop, appdate, gsettings) are still not handled
- translator stuff
- docs (yelp etc)
- fix detection of first weekday support
- learn more about meson to check if there are cleaner ways
- distcheck etc?
data/meson.build | 11 +++++++++++
meson.build | 32 ++++++++++++++++++++++++++++++++
src/meson.build | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 97 insertions(+), 0 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..355aadf
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,11 @@
+gnome_module = import('gnome')
+
+iconsdir = join_paths(get_option('datadir'), 'icons/hicolor')
+foreach size: ['16x16', '22x22', '32x32', '48x48', '256x256', 'scalable']
+ install_subdir('icons/' + size, install_dir: iconsdir)
+endforeach
+
+resources = gnome_module.compile_resources('org.gnome.clocks',
+ 'gnome-clocks.gresource.xml',
+ source_dir: '.',
+ c_name: 'resources')
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..90da4c9
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,32 @@
+project('gnome-clocks',
+ ['vala', 'c'],
+ version: '3.23.0',
+ license: 'GPL')
+
+glib = dependency('glib-2.0', version: '>=2.44')
+gio = dependency('gio-2.0', version: '>=2.44')
+gobject = dependency('gobject-2.0', version: '>=2.44')
+gtk = dependency('gtk+-3.0', version: '>=3.20')
+gsound = dependency('gsound', version: '>=0.98')
+gweather = dependency('gweather-3.0', version: '>=3.14')
+gnomedesktop = dependency('gnome-desktop-3.0', version: '>=3.8')
+geocodeglib = dependency('geocode-glib-1.0', version: '>=1.0')
+libgeoclue = dependency('libgeoclue-2.0', version: '>=2.4')
+
+cc = meson.get_compiler('c')
+math = cc.find_library('m', required: false)
+
+conf = configuration_data()
+conf.set_quoted('G_LOG_DOMAIN', 'org.gnome.Clocks')
+conf.set_quoted('PACKAGE_NAME', 'gnome-clocks')
+conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+conf.set_quoted('VERSION', meson.project_version())
+conf.set_quoted('GETTEXT_PACKAGE', 'gnome-clocks')
+conf.set_quoted('DATADIR', get_option('prefix') + '/' + get_option('datadir'))
+conf.set_quoted('GNOMELOCALEDIR', get_option('prefix') + '/' + get_option('datadir') + '/locale')
+conf.set('HAVE__NL_TIME_FIRST_WEEKDAY', '1') # FIXME detect
+configure_file(output : 'config.h', configuration : conf)
+config_h_dir = include_directories('.')
+
+subdir('data')
+subdir('src')
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..a81ca50
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,54 @@
+vala_sources = [
+ 'alarm.vala',
+ 'application.vala',
+ 'clock.vala',
+ 'config.vapi',
+ 'geocoding.vala',
+ 'main.vala',
+ 'search-provider.vala',
+ 'stopwatch.vala',
+ 'timer.vala',
+ 'utils.vala',
+ 'widgets.vala',
+ 'window.vala',
+ 'world.vala'
+]
+
+c_sources = [
+ 'cutils.c'
+]
+
+vala_args = [
+ '--target-glib=2.44',
+ '--vapidir=' + meson.current_source_dir(),
+ '--gresources=' + meson.current_source_dir() + '/../data/gnome-clocks.gresource.xml',
+]
+
+c_args = [
+ '-include', 'config.h',
+ '-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE',
+ '-DGNOME_DESKTOP_USE_UNSTABLE_API'
+]
+
+dependencies = [
+ glib,
+ gio,
+ gobject,
+ gtk,
+ gsound,
+ gweather,
+ gnomedesktop,
+ geocodeglib,
+ libgeoclue,
+ math
+]
+
+executable('gnome-clocks',
+ vala_sources + c_sources,
+ resources,
+ include_directories: config_h_dir,
+ vala_args: vala_args,
+ c_args: c_args,
+ install: true,
+ dependencies: dependencies)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]