-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
73 lines (61 loc) · 1.36 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
64
65
66
67
68
69
70
71
72
73
project(
'libliftoff',
'c',
version: '0.4.1',
license: 'MIT',
meson_version: '>=0.52.0',
default_options: [
'c_std=c11',
'warning_level=3',
'werror=true',
],
)
cc = meson.get_compiler('c')
add_project_arguments(cc.get_supported_arguments([
'-Wundef',
'-Wmissing-prototypes',
'-Walloca',
'-Wdeclaration-after-statement',
'-Wfloat-conversion',
'-Wsign-conversion',
'-Wno-missing-braces',
'-Wno-unused-parameter',
]), language: 'c')
liftoff_inc = include_directories('include')
drm = dependency('libdrm', include_type: 'system', version: '>= 2.4.108')
liftoff_deps = [drm]
liftoff_lib = library(
'liftoff',
files(
'alloc.c',
'device.c',
'layer.c',
'list.c',
'log.c',
'output.c',
'plane.c',
),
include_directories: liftoff_inc,
version: meson.project_version().split('-')[0],
dependencies: liftoff_deps,
install: true,
)
liftoff = declare_dependency(
link_with: liftoff_lib,
include_directories: liftoff_inc,
dependencies: liftoff_deps,
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('libliftoff', liftoff)
endif
install_headers('include/libliftoff.h')
pkgconfig = import('pkgconfig')
pkgconfig.generate(
liftoff_lib,
filebase: meson.project_name(),
name: meson.project_name(),
description: 'KMS plane library',
url: 'https://gitlab.freedesktop.org/emersion/libliftoff',
)
subdir('example')
subdir('test')