aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
blob: 085036dcf8339cdf08a5f3f8cfb93ffc96552383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
project('waltham-transmitter',
  'c',
  version: '0.0.1',
  default_options: [
    'warning_level=3',
    'c_std=gnu99',
  ],
  meson_version: '>= 0.50',
  license: 'MIT/Expat',
)

pkgconfig = import('pkgconfig')
cc = meson.get_compiler('c')

add_project_arguments(
  cc.get_supported_arguments([
    '-Wno-unused-parameter',
    '-Wno-pedantic',
    '-Wextra',
    '-Werror'
  ]),
  language: 'c'
)

add_project_arguments([
    '-DPACKAGE_STRING="waltham-transmitter @0@"'.format(meson.project_version()),
    '-D_GNU_SOURCE',
    '-D_ALL_SOURCE',
  ],
  language: 'c'
)

optional_libc_funcs = [ 'memfd_create', 'strchrnul' ]
foreach func: optional_libc_funcs
    if cc.has_function(func)
        add_project_arguments('-DHAVE_@0@=1'.format(func.to_upper()), language: 'c')
    endif
endforeach


env_modmap = ''
libweston_major_version = '9'
libweston_version = 'libweston-@0@'.format(libweston_major_version)
libweston_dep = dependency(libweston_version)

libwayland_dep = dependency('wayland-server')
libwaltham_dep = dependency('waltham')
weston_dep = dependency('weston')

prefix_path = get_option('prefix')
plugin_dir = join_paths(prefix_path, get_option('libdir'))
plugin_install_dir = join_paths(plugin_dir, libweston_version)
common_inc = include_directories('include')

dir_include_waltham_transmiter_install = 'waltham-transmitter'

pkgconfig.generate(
        filebase: 'waltham-transmitter',
        name: 'waltham-transmitter-plugin',
        version: '0.0.1',
        description: 'header file for waltham transmitter plugin',
        install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'pkgconfig')
)

subdir('transmitter-plugin')
subdir('include')