-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
44 lines (34 loc) · 1.35 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
# SPDX-License-Identifier: CC0-1.0
project('pykms', 'cpp',
meson_version : '>= 0.64',
version : '0.0.0',
default_options : [
'cpp_std=c++17',
],)
message('Cloning from: @0@, revision @1@'.format(get_option('repository'), get_option('revision')))
r = run_command('clone-kmsxx.sh', get_option('repository'), get_option('revision'), get_option('patch'), check : true)
missing_message = 'Requires: libkms++-dev, libfmt-dev, libdrm-dev - please install using apt'
libkmsxx_dep = dependency('kms++', required : true, not_found_message : missing_message)
libkmsxxutil_dep = dependency('kms++util', required : true, not_found_message : missing_message)
add_global_arguments('-DHAS_KMSXXUTIL', language : 'cpp')
libfmt_dep = dependency('fmt', required : true, not_found_message : missing_message)
libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
if libdrmomap_dep.found()
add_global_arguments('-DHAS_LIBDRM_OMAP', language : 'cpp')
endif
py = import('python').find_installation()
message('Using python version @0@ from @1@'.format(py.version(), py.path()))
subdir('kmsxx/py')
py.install_sources(
'kmsxx/py/pykms/__init__.py',
subdir : 'pykms',
pure : false,
)
py.extension_module(
'pykms',
pykms_sources,
install : true,
subdir : 'pykms',
dependencies : pykms_deps,
cpp_args : pykms_args,
)