meson.build 1.41 KB
Newer Older
1
2
project(
    'squeekboard',
3
    'c', 'rust',
Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
4
    version: '1.3.0',
5
    license: 'GPLv3',
6
    meson_version: '>=0.51.0',
7
8
9
10
11
    default_options: [
        'warning_level=1',
        'buildtype=debugoptimized',
        'c_std=gnu11'
    ]
12
13
)

14
15
16
17
18
add_project_arguments(
  [
    '-Werror=implicit-function-declaration',
    '-Werror=implicit-fallthrough=3',
    '-Werror=maybe-uninitialized',
19
    '-Werror=missing-field-initializers',
20
    '-Werror=incompatible-pointer-types',
21
    '-Werror=int-conversion',
22
23
24
25
  ],
  language: 'c'
)

David Boddie's avatar
David Boddie committed
26
27
i18n = import('i18n')

Guido Gunther's avatar
Guido Gunther committed
28
29
conf_data = configuration_data()

30
31
32
33
34
35
36
if get_option('buildtype').startswith('debug')
    add_project_arguments('-DDEBUG=1', language : 'c')
endif
if get_option('buildtype') != 'plain'
    add_project_arguments('-fstack-protector-strong', language: 'c')
endif

37
38
39
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
pkgdatadir = join_paths(datadir, meson.project_name())
40
41
42
43
44
45
if get_option('depdatadir') == ''
  depdatadir = datadir
else
  depdatadir = get_option('depdatadir')
endif
dbusdir = join_paths(depdatadir, 'dbus-1/interfaces')
46

Guido Gunther's avatar
Guido Gunther committed
47
48
49
50
51
52
53
54
55
56
summary = [
        '',
        '------------------',
        'squeekboard @0@'.format(meson.project_version()),
        '',
        '------------------',
        ''
]
message('\n'.join(summary))

57
58
59
cargo = find_program('cargo')
cargo_script = find_program('cargo.sh')

60
subdir('data')
Dorota Czaplejewicz's avatar
Dorota Czaplejewicz committed
61
subdir('protocols')
62
subdir('eek')
63
subdir('src')
64
subdir('tests')