1project('gtk-layer-shell',
2    ['c'],
3    version: '0.7.0',
4    license: 'LGPLv3',
5    meson_version: '>=0.45.1',
6    default_options: ['c_std=gnu11', 'warning_level=3'])
7
8lib_so_version = '0'
9
10add_project_arguments(
11    ['-Wno-pedantic', '-Werror=unused-function'],
12    language: 'c')
13
14gtk = dependency('gtk+-3.0', version: '>=3.22.0')
15wayland_client = dependency('wayland-client', version: '>=1.10.0')
16
17# only required for the tests
18wayland_server = dependency('wayland-server', version: '>=1.10.0', required: false)
19
20# wayland_scanner is required, but we can find it without pkg-config
21wayland_scanner = dependency('wayland-scanner', version: '>=1.10.0', required: false)
22
23# use system xdg-shell protocol when available
24wayland_protocols = dependency('wayland-protocols', version: '>=1.16', required: false)
25
26pkg_config = import('pkgconfig')
27gnome = import('gnome')
28
29subdir('include')
30subdir('protocol')
31subdir('gtk-priv')
32subdir('src')
33
34gtk_layer_shell = declare_dependency(
35    link_with: gtk_layer_shell_lib,
36    include_directories: gtk_layer_shell_inc)
37
38subdir('examples')
39
40if get_option('docs')
41    subdir('doc')
42endif
43
44if get_option('tests')
45    subdir('test')
46else
47    # Add a single always-failing test to tell the user to reconfigure with tests enabled
48    py = find_program('python3')
49    tests_not_enabled_script = files(meson.current_source_dir() + '/test/tests-not-enabled.py')
50    test('Tests not enabled', py, args: [tests_not_enabled_script])
51endif
52