meson.build - wmenu - [fork] efficient dynamic menu for wayland
 (HTM) git clone https://git.drkhsh.at/wmenu.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       meson.build (1309B)
       ---
            1 wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')
            2 
            3 wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)
            4 if wayland_scanner_dep.found()
            5         wayland_scanner = find_program(
            6                 wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner'),
            7                 native: true,
            8         )
            9 else
           10         wayland_scanner = find_program('wayland-scanner', native: true)
           11 endif
           12 
           13 protocols = [
           14         [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
           15         [wl_protocol_dir, 'staging/xdg-activation/xdg-activation-v1.xml'],
           16         ['wlr-layer-shell-unstable-v1.xml'],
           17 ]
           18 
           19 wl_protos_src = []
           20 wl_protos_headers = []
           21 
           22 foreach p : protocols
           23         xml = join_paths(p)
           24         wl_protos_src += custom_target(
           25                 xml.underscorify() + '_protocol_c',
           26                 input: xml,
           27                 output: '@BASENAME@-protocol.c',
           28                 command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
           29         )
           30         wl_protos_headers += custom_target(
           31                 xml.underscorify() + '_client_h',
           32                 input: xml,
           33                 output: '@BASENAME@-client-protocol.h',
           34                 command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
           35         )
           36 endforeach
           37 
           38 lib_client_protos = static_library(
           39         'client_protos',
           40         wl_protos_src + wl_protos_headers,
           41         dependencies: wayland_client.partial_dependency(compile_args: true),
           42 )
           43 
           44 client_protos = declare_dependency(
           45         link_with: lib_client_protos,
           46         sources: wl_protos_headers,
           47 )