summaryrefslogtreecommitdiff
path: root/app-i18n/xvnkb/files/meson.build
blob: 502942233402a94fd372a2b46d6c61f7d764e694 (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
67
68
69
70
71
72
project('xvnkb', 'c', version: '0.2.11', meson_version: '>=1.4.0')

add_project_arguments('-DVK_NEED_UCHAR', language: 'c')

conf_data = configuration_data()
conf_data.set('version', meson.project_version())
conf_data.set('VK_USE_ABCSTROKE', get_option('abcstroke'))
conf_data.set('VK_USE_EXTSTROKE', get_option('extstroke'))
conf_data.set('VK_USE_PROSTROKE', get_option('prostroke'))
conf_data.set('VK_CHECK_SPELLING', get_option('spellcheck'))

configure_file(
    output: 'config.h',
    input: 'config.h.in',
    configuration: conf_data,
)

dl_dep = dependency('dl')
xlib_dep = dependency('X11')

xft_dep = dependency('xft', required: get_option('xft'))
if get_option('xft').enabled()
    add_project_arguments('-DUSE_XFT', language: 'c')
endif

deps = [dl_dep, xlib_dep, xft_dep]

core_src = ['xvnkb.c', 'visckey.c']
core = library(
    'xvnkb',
    core_src,
    name_prefix: '',
    soversion: meson.project_version(),
    dependencies: deps,
    install: true,
)

src = [
    'data.c',
    'flash.c',
    'main.c',
    'event.c',
    'mainwin.c',
    'menu.c',
    'hotkey.c',
    'systray.c',
    'mode.c',
    'property.c',
    'session.c',
    'xconfig.c',
    'xresource.c',
    'label.c',
    'button.c',
    'msgbox.c',
]
executable('xvnkb', src, dependencies: deps, link_with: core, install: true)

ctrl_src = [
    'tools/xvnkb_ctrl.c',
    'tools/data.c',
    'tools/mode.c',
    'tools/property.c',
    'tools/xconfig.c',
]
executable(
    'xvnkb_ctlr',
    ctrl_src,
    dependencies: deps,
    link_with: core,
    install: true,
)