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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# SPDX-License-Identifier: MIT
# Copyright © 2022 Intel Corporation
project(
'libXvMC',
'c',
version : '1.0.12',
meson_version : '>= 0.58',
default_options : ['default_library=both'],
)
cc = meson.get_compiler('c')
dep_dl = dependency('dl', required : false)
if not dep_dl.found()
dep_dl = cc.find_library('dl', required : false)
endif
deps = [
dependency('x11', version : '>= 1.6'),
dependency('xext'),
dependency('xv'),
dependency('xextproto'),
dependency('videoproto'),
dep_dl,
]
conf = configuration_data()
if cc.has_function('shmat')
conf.set('HAVE_SHMAT', true)
endif
configure_file(
configuration : conf,
output : 'config.h',
)
install_headers(
'include/X11/extensions/vldXvMC.h',
'include/X11/extensions/XvMClib.h',
subdir : 'X11/extensions',
)
install_data(
'XvMC_API.txt',
install_dir : get_option('datadir') / 'doc',
)
pkg = import('pkgconfig')
inc = include_directories('include')
libXvMC = library(
'XvMC',
'src/XvMC.c',
c_args : ['-DHAVE_CONFIG_H'],
include_directories : inc,
dependencies : deps,
version : '1.0.0',
install : true,
)
pkg.generate(
libXvMC,
filebase : 'xvmc',
description : 'The XvMC Library',
version : meson.project_version(),
)
ext_libXvMC = declare_dependency(
link_with : libXvMC,
include_directories : inc,
)
meson.override_dependency('xvmc', ext_libXvMC)
libXvMCW = library(
'XvMCW',
'wrapper/XvMCWrapper.c',
include_directories : inc,
c_args : [
'-DXVMC_CONFIGDIR=@0@/X11'.format(get_option('sysconfdir')),
'-DXVMC_SOVERSION=".1.0"',
'-DXV_SOVERSION=".1.0"',
],
dependencies : deps,
version : '1.0.0',
install : true,
)
ext_libXvMCW = declare_dependency(
link_with : libXvMCW,
include_directories : inc,
)
pkg.generate(
libXvMCW,
name : 'XvMCWrapper',
filebase : 'xvmc-wrapper',
description : 'XvMC wrapper library',
version : meson.project_version(),
)
meson.override_dependency('xvmc-wrapper', ext_libXvMCW)
|