-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
58 lines (48 loc) · 1.17 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
project(
'tegra_udrm_gbm',
'c',
version : '1.0.0',
license : 'MIT',
default_options : [
'warning_level=3',
'buildtype=debugoptimized',
'c_std=gnu99',
],
)
project_description = 'mesa gbm loader for libnvgbm'
project_headers = [
'tegra_udrm_gbm_int.h'
]
project_source_files = [
'tegra_udrm_gbm.c'
]
cc = meson.get_compiler('c')
nvbufsurface_dep = cc.find_library('nvbufsurface', required : true)
project_dependencies = [
dependency('libdrm'),
nvbufsurface_dep,
dependency('gbm', version : ['>=21.2.0'])
]
build_args = [
'-Wno-pedantic',
]
gbm_backends_path = get_option('gbm-backends-path')
if gbm_backends_path == ''
gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
endif
# ===================================================================
build_args += [
'-DPROJECT_NAME=' + meson.project_name(),
'-DPROJECT_VERSION=' + meson.project_version(),
]
project_target = shared_library(
'tegra-udrm_gbm',
project_source_files,
name_prefix: '',
dependencies: project_dependencies,
install : true,
c_args : build_args,
gnu_symbol_visibility : 'hidden',
install : true,
install_dir : gbm_backends_path,
)