meson.build (1156B)
1 project( 2 'wio', 3 'c', 4 license: 'BSD-3-Clause', 5 default_options: [ 6 'c_std=c11', 7 'warning_level=2', 8 'werror=true', 9 ], 10 ) 11 12 add_project_arguments( 13 [ 14 '-DWL_HIDE_DEPRECATED', 15 '-DWLR_USE_UNSTABLE', 16 17 '-Wno-unused-parameter', 18 '-Wno-unused-result', 19 '-Wundef', 20 ], 21 language: 'c', 22 ) 23 24 cc = meson.get_compiler('c') 25 26 # Prefer wlroots subproject if it is available. 27 wlroots_proj = subproject( 28 'wlroots', 29 default_options: ['examples=false'], 30 required: false, 31 ) 32 if wlroots_proj.found() 33 wlroots = wlroots_proj.get_variable('wlroots') 34 else 35 wlroots = dependency('wlroots', version: '>=0.13.0') 36 endif 37 38 cairo = dependency('cairo') 39 drm = dependency('libdrm') 40 math = cc.find_library('m') 41 wayland_server = dependency('wayland-server') 42 wayland_protos = dependency('wayland-protocols') 43 xkbcommon = dependency('xkbcommon') 44 45 wio_inc = include_directories('include') 46 47 subdir('protocols') 48 49 wio_sources = files( 50 'main.c', 51 'layers.c', 52 'input.c', 53 'output.c', 54 'view.c', 55 ) 56 57 executable( 58 'wio', 59 wio_sources, 60 include_directories: [wio_inc], 61 dependencies: [ 62 cairo, 63 drm, 64 math, 65 server_protos, 66 wayland_server, 67 wlroots, 68 xkbcommon, 69 ], 70 install: true 71 )