-
Notifications
You must be signed in to change notification settings - Fork 39
/
meson.build
63 lines (47 loc) · 1.6 KB
/
meson.build
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
56
57
58
59
60
61
62
63
project('libportal','c',
version: '0.8.1',
default_options: ['warning_level=2'],
meson_version: '>= 0.49.0')
cc = meson.get_compiler('c')
cflags = [
'-Wno-unused-parameter',
'-Wno-missing-field-initializers',
]
add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
gnome = import('gnome')
pkgconfig = import('pkgconfig')
qt5 = import('qt5')
if get_option('backend-qt6').enabled() and meson.version().version_compare('< 0.59.0')
error('qt6 backend requires meson 0.59.0 or newer')
endif
if meson.version().version_compare('>= 0.59.0')
qt6 = import('qt6')
endif
conf = configuration_data()
conf.set_quoted('G_LOG_DOMAIN', 'libportal')
conf.set_quoted('PACKAGE_NAME', 'libportal')
conf.set_quoted('PKGDATADIR', join_paths(get_option('prefix'), get_option('datadir'), 'libportal'))
conf.set_quoted('APPDATADIR', join_paths(get_option('prefix'), get_option('datadir'), 'org.gnome.PortalTest'))
if cc.has_argument('-fvisibility=hidden')
conf.set('XDP_PUBLIC', '__attribute__((visibility("default"))) extern')
endif
check_headers = ['sys/vfs.h']
foreach header : check_headers
macro = 'HAVE_' + header.underscorify().to_upper()
conf.set(macro, cc.has_header(header) ? 1 : false)
endforeach
configure_file(output : 'config.h', configuration : conf)
introspection = get_option('introspection')
vapi = get_option('vapi')
top_inc = include_directories('.')
libportal_inc = include_directories('libportal')
subdir('libportal')
if get_option('portal-tests')
subdir('portal-test')
endif
if get_option('tests')
subdir('tests')
endif
if get_option('docs')
subdir('doc')
endif