project('libvlkn', 'c', version: '0.1', default_options: ['warning_level=3']) cc = meson.get_compiler('c') incls = include_directories('include/') src = [ 'src/buffer.c', 'src/pipeline.c', 'src/renderer.c', 'src/utils.c', 'src/window.c', ] libs = [ dependency('vulkan'), dependency('wayland-client'), ] wl_protocols = dependency('wayland-protocols').get_variable('pkgdatadir') wl_scanner = find_program(dependency('wayland-scanner').get_variable('wayland_scanner')) protos = { 'xdg-shell': wl_protocols / 'stable/xdg-shell/xdg-shell.xml', 'xdg-decoration': wl_protocols / 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml' } foreach name, path : protos src += custom_target( name.underscorify() + '_c', input: path, output: '@BASENAME@-protocol.c', command: [wl_scanner, 'private-code', '@INPUT@', '@OUTPUT@'] ) src += custom_target( name.underscorify() + '_h', input: path, output: '@BASENAME@-protocol.h', command: [wl_scanner, 'client-header', '@INPUT@', '@OUTPUT@'] ) endforeach vlkn = library('libvlkn', src, dependencies: libs, include_directories: incls, install: true) libvlkn_dep = declare_dependency(link_with: vlkn, include_directories: incls) meson.override_dependency('libvlkn', libvlkn_dep) executable('vlkntest', 'src/test.c', dependencies: libvlkn_dep)