summaryrefslogtreecommitdiff
path: root/meson.build
blob: cfacd5118d36032366fa8f9d9e18cffe6f8ad28c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
project('geoclue', 'c', version: '2.4.10', meson_version : '>= 0.47.0')

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