summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZeeshan Ali <zeenix@gmail.com>2017-07-20 14:33:10 +0200
committerZeeshan Ali <zeenix@collabora.co.uk>2018-07-09 13:27:54 +0200
commitaf187c8e5463abb744198c870443884b37f16412 (patch)
treedd3877cfea9ea6d54bee27ca8fd3d1dd120f3282 /meson.build
parente1918f732397090c44e46e1339bc4d06a40de958 (diff)
Add meson build support
During the porting I found some issues in meson that have been fixed in the git master and hence we require the upcoming release of meson: 0.47.0.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build55
1 files changed, 55 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..dc3bdd9
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,55 @@
+project('geoclue', 'c', version: '2.4.10', meson_version : '>= 0.46.1')
+
+gclue_version = meson.project_version()
+ver_arr = gclue_version.split('.')
+
+gclue_major_version = ver_arr[0]
+gclue_minor_version = ver_arr[1]
+gclue_micro_version = ver_arr[2]
+
+gclue_api_version='2.0'
+
+conf = configuration_data()
+conf.set_quoted('VERSION', gclue_version)
+conf.set_quoted('PACKAGE_VERSION', gclue_version)
+conf.set_quoted('PACKAGE_NAME', 'geoclue')
+conf.set_quoted('GETTEXT_PACKAGE', 'geoclue')
+conf.set_quoted('PACKAGE_TARNAME', 'geoclue')
+conf.set_quoted('PACKAGE_STRING', 'geoclue ' + gclue_version)
+conf.set_quoted('PACKAGE_URL', 'http://www.freedesktop.org/wiki/Software/GeoClue')
+conf.set_quoted('PACKAGE_BUGREPORT', 'http://bugs.freedesktop.org/enter_bug.cgi?product=GeoClue')
+conf.set_quoted('TEST_SRCDIR', meson.source_root() + '/data/')
+datadir = get_option('prefix') + '/' + get_option('datadir')
+conf.set_quoted('LOCALEDIR', datadir + '/locale')
+conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
+
+configure_file(output: 'config.h', configuration : conf)
+configinc = include_directories('.')
+
+gnome = import('gnome')
+cc = meson.get_compiler('c')
+
+add_global_arguments([ '-Wall' ], language: 'c')
+
+base_deps = [ dependency('glib-2.0', version: '>= 2.34.0'),
+ dependency('gio-2.0', version: '>= 2.34.0'),
+ dependency('gio-unix-2.0', version: '>= 2.34.0') ]
+libm = cc.find_library('m', required: false)
+if libm.found()
+ base_deps += [ libm ]
+endif
+
+subdir('public-api')
+if get_option('enable-backend')
+ subdir('src')
+endif
+if get_option('enable-libgeoclue')
+ subdir('libgeoclue')
+endif
+subdir('data')
+subdir('demo')
+subdir('po')
+
+if get_option('enable-gtk-doc')
+ subdir('docs')
+endif