hc
2025-02-14 bbb9540dc49f70f6b703d1c8d1b85fa5f602d86e
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
project(
    'libdrm-cursor',
    'c',
    version : '1.0.0',
    meson_version : '>=0.47.0',
    default_options: ['buildtype=release', 'warning_level=3'],
)
 
pkgconfig = import('pkgconfig')
 
libdrm_dep = dependency('libdrm', version : '>= 2.4.0')
libthreads_dep = dependency('threads')
libgbm_dep = dependency('gbm')
libegl_dep = dependency('egl')
libgles_dep = dependency('glesv2')
 
libdrm_cursor_deps = [
    libdrm_dep,
    libthreads_dep,
    libgbm_dep,
    libegl_dep,
    libgles_dep,
]
 
libdrm_cursor_srcs = [
    'drm_cursor.c',
    'drm_egl.c',
]
 
add_project_arguments(['-D_GNU_SOURCE'], language: 'c')
 
if get_option('prefer-afbc')
    message('Prefer ARM AFBC modifier')
    add_project_arguments(['-DPREFER_AFBC_MODIFIER'], language: 'c')
endif
 
libdrm_cursor = shared_library(
    'drm-cursor',
    libdrm_cursor_srcs,
    dependencies : libdrm_cursor_deps,
    version : meson.project_version(),
    install : true,
)
 
pkgconfig.generate(
    libraries : 'libdrm-cursor',
    filebase : 'libdrm-cursor',
    name : 'libdrm-cursor',
    version : meson.project_version(),
    description : 'A hook of drm cursor APIs to fake cursor plane.',
)
 
configure_file(
    input : 'drm-cursor.conf.sample',
    output : 'drm-cursor.conf',
    install_dir : get_option('sysconfdir'),
    copy : true,
)
 
executable(
    'cursor-test',
    [ libdrm_cursor_srcs, 'test.c' ],
    dependencies : libdrm_cursor_deps,
    install : get_option('install-test'),
)