meson.build 3.28 KB
Newer Older
1
project('gnome-contacts', [ 'vala', 'c' ],
2
  version: '3.31.4',
3
  license: 'GPL2+',
4
  meson_version: '>= 0.41',
5
6
7
8
9
10
11
12
13
14
15
)

gnome = import('gnome')
i18n = import('i18n')

# Add our custom VAPI dir
add_project_arguments(
  ['--vapidir', join_paths(meson.source_root(), 'vapi')],
  language: 'vala'
)

16
# Options
17
cheese_enabled = get_option('cheese')
18
19
telepathy_enabled = get_option('telepathy')
docs_enabled = get_option('docs')
20
manpage_enabled = get_option('manpage')
21
22

# Common variables
23
24
contacts_app_id = 'org.gnome.Contacts'

25
config_h_dir = include_directories('.')
26
27
28
29
30
31
32
33
contacts_prefix = get_option('prefix')
datadir = join_paths(contacts_prefix, get_option('datadir'))
bindir = join_paths(contacts_prefix, get_option('bindir'))
libdir = join_paths(contacts_prefix, get_option('libdir'))
libexecdir = join_paths(contacts_prefix, get_option('libexecdir'))
locale_dir = join_paths(contacts_prefix, get_option('localedir'))
pkgdatadir = join_paths(datadir, meson.project_name())
pkglibdir = join_paths(libdir, meson.project_name())
34
35
36
po_dir = join_paths(meson.source_root(), 'po')

# Dependencies
37
38
min_eds_version = '3.13.90'
min_folks_version = '0.11.4'
39
min_glib_version = '2.44' # We also use this value for --target-glib, so scratch the micro version.
Adrien Plazas's avatar
Adrien Plazas committed
40
min_handy_version = '0.0.4'
41

42
43
math = meson.get_compiler('c').find_library('m')

44
45
folks = dependency('folks', version: '>=' + min_folks_version)
folks_eds = dependency('folks-eds', version: '>=' + min_folks_version)
46
gee = dependency('gee-0.8')
47
48
49
gio_unix = dependency('gio-unix-2.0', version: '>=' + min_glib_version)
glib = dependency('glib-2.0', version: '>=' + min_glib_version)
gmodule_export = dependency('gmodule-export-2.0', version: '>=' + min_glib_version)
50
51
gnome_desktop = dependency('gnome-desktop-3.0')
goa = dependency('goa-1.0')
Adrien Plazas's avatar
Adrien Plazas committed
52
gtk = dependency('gtk+-3.0', version: '>= 3.23.1')
53
54
55
libebook = dependency('libebook-1.2', version: '>=' + min_eds_version)
libedataserver = dependency('libedataserver-1.2', version: '>=' + min_eds_version)
libedataserverui = dependency('libedataserverui-1.2', version: '>=' + min_eds_version)
Adrien Plazas's avatar
Adrien Plazas committed
56
libhandy = dependency('libhandy-0.0', version: '>=' + min_handy_version)
57

58
if cheese_enabled
59
60
  cheese = dependency('cheese')
  cheese_gtk = dependency('cheese-gtk', version: '>= 3.3.91')
61
endif
Niels De Graef's avatar
Niels De Graef committed
62

63
64
65
66
67
if telepathy_enabled
  folks_telepathy = dependency('folks-telepathy', version: '>=' + min_folks_version)
  telepathy_glib = dependency('telepathy-glib', version: '>= 0.22.0')
endif

68
69
valadoc = find_program('valadoc', required: docs_enabled)

70

71
72
# Configuration
conf = configuration_data()
73
conf.set_quoted('APP_ID', contacts_app_id)
74
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
Niels De Graef's avatar
Niels De Graef committed
75
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
76
77
78
79
80
81
82
conf.set_quoted('LOCALEDIR', locale_dir)
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_STRING', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('PKGDATADIR', pkgdatadir)
conf.set_quoted('PKGLIBDIR', pkglibdir)
conf.set_quoted('VERSION', meson.project_version())
83
conf.set('GOA_API_IS_SUBJECT_TO_CHANGE', true)
84
85
configure_file(output: 'config.h', configuration: conf)

86
# Post-install scripts
87
meson.add_install_script('build-aux/meson_post_install.py')
88
89

# Subfolders
90
91
92
93
subdir('data')
subdir('po')
subdir('src')
subdir('man')
94
95
96
if docs_enabled
  subdir('docs')
endif
Niels De Graef's avatar
Niels De Graef committed
97
subdir('tests')