1project( 2 'libdrm-cursor', 3 'c', 4 version : '1.0.0', 5 meson_version : '>=0.47.0', 6 default_options: ['buildtype=release', 'warning_level=3'], 7) 8 9pkgconfig = import('pkgconfig') 10 11libdrm_dep = dependency('libdrm', version : '>= 2.4.0') 12libthreads_dep = dependency('threads') 13libgbm_dep = dependency('gbm') 14libegl_dep = dependency('egl') 15libgles_dep = dependency('glesv2') 16 17libdrm_cursor_deps = [ 18 libdrm_dep, 19 libthreads_dep, 20 libgbm_dep, 21 libegl_dep, 22 libgles_dep, 23] 24 25libdrm_cursor_srcs = [ 26 'drm_cursor.c', 27 'drm_egl.c', 28] 29 30add_project_arguments(['-D_GNU_SOURCE'], language: 'c') 31 32if get_option('prefer-afbc') 33 message('Prefer ARM AFBC modifier') 34 add_project_arguments(['-DPREFER_AFBC_MODIFIER'], language: 'c') 35endif 36 37libdrm_cursor = shared_library( 38 'drm-cursor', 39 libdrm_cursor_srcs, 40 dependencies : libdrm_cursor_deps, 41 version : meson.project_version(), 42 install : true, 43) 44 45pkgconfig.generate( 46 libraries : 'libdrm-cursor', 47 filebase : 'libdrm-cursor', 48 name : 'libdrm-cursor', 49 version : meson.project_version(), 50 description : 'A hook of drm cursor APIs to fake cursor plane.', 51) 52 53configure_file( 54 input : 'drm-cursor.conf.sample', 55 output : 'drm-cursor.conf', 56 install_dir : get_option('sysconfdir'), 57 copy : true, 58) 59 60executable( 61 'cursor-test', 62 [ libdrm_cursor_srcs, 'test.c' ], 63 dependencies : libdrm_cursor_deps, 64 install : get_option('install-test'), 65) 66