File: meson.build

package info (click to toggle)
vala-panel-appmenu 0.7.3+dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,368 kB
  • sloc: ansic: 2,609; xml: 83; makefile: 58; sh: 7
file content (67 lines) | stat: -rw-r--r-- 1,577 bytes parent folder | download
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
67
subdir('dbusmenu-importer')
sources = files(
    'appmenu-abstractions.vala',
    'appmenu-bamf.vala',
    'registrar.vala',
    'menu-widget.vala',
    'helper-desktop.vala',
    'helper-dbus.vala',
    'helper-dbusmenu.vala',
    'helper-menumodel.vala',
    'launcher.vapi',
    'dbus-menu-importer.vapi',
    'launcher.c',
    'launcher.h'
)

matcher_src = files(
    'matcher.c',
    'matcher.h',
    'matcher.vapi'
)

libres = gnome.compile_resources(
    'lib', 'libappmenu.gresource.xml',
    source_dir: '.',
    c_name: 'lib'
)
valac = meson.get_compiler('vala')
posix_dep = valac.find_library('posix')
vver = valac.version()
addons_versions = {
    '<0.37.0': '<0.36.18',
    '<0.41.0': '<0.40.14',
    '<0.43.0': '<0.42.6',
    '<0.45.0': '<0.44.0'
}
addons_needed = false
foreach series, ver : addons_versions
    if vver.version_compare(series) and vver.version_compare(ver)
        addons_needed = true
        break
    endif
endforeach
if addons_needed
    sources += files('../vapi/gio-addons-2.0.vapi')
endif
appmenu_deps = [giounix, gtk, bamf, importer_dep, posix_dep]
appmenu_cflags = []
if wnck.found()
    sources += matcher_src
    appmenu_deps += wnck
    appmenu_cflags += ['-DWNCK_I_KNOW_THIS_IS_UNSTABLE']
endif

appmenu_lib = static_library('libappmenu',
        sources, config,
        dependencies: appmenu_deps,
        c_args: appmenu_cflags,
        pic: true
    )
appmenu_inc = include_directories('.')

appmenu_dep = declare_dependency(
    include_directories: appmenu_inc,
    dependencies: [gtk, giounix],
    link_whole: appmenu_lib
)