-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmeson.build
64 lines (56 loc) · 1.43 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
project(
'librga',
'cpp',
version : '2.0.0',
meson_version : '>=0.47.0',
default_options : ['warning_level=3', 'cpp_std=c++14']
)
pkgconfig = import('pkgconfig')
libdrm_dep = dependency('', required : false)
libdrm_option = get_option('libdrm')
if libdrm_option != 'false'
libdrm_dep = dependency('libdrm', version : '>= 2.4.0')
if libdrm_option == 'true' and not libdrm_dep.found()
error('libdrm requested, but not found.')
endif
endif
if libdrm_dep.found()
message('Building with libdrm.')
add_project_arguments('-DLIBDRM=1', language : 'cpp')
else
message('Building without libdrm.')
endif
git_version_h = vcs_tag(
command : ['git', 'rev-parse', '--short', 'HEAD'],
input : 'version.h.in', output : 'version.h',
)
add_project_arguments('-include', 'version.h', language : 'cpp')
librga_srcs = [
git_version_h,
'RgaApi.cpp',
'RockchipRga.cpp',
'normal/NormalRga.cpp',
'normal/NormalRgaApi.cpp',
]
librga = shared_library(
'rga',
librga_srcs,
dependencies : libdrm_dep,
version : meson.project_version(),
install : true,
)
install_headers(
'rga.h',
'drmrga.h',
'RgaApi.h',
'RockchipRga.h',
'RockchipRgaMacro.h',
subdir : 'rga',
)
pkgconfig.generate(
libraries : librga,
filebase : 'librga',
name : 'librga',
version : meson.project_version(),
description : 'Userspace interface to Rockchip RGA 2D accelerator',
)