summaryrefslogtreecommitdiffstats
path: root/src/locale/meson.build
blob: 3d3aa589c33439bf0cc424a4a9b4db55c54ca65b (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
# SPDX-License-Identifier: LGPL-2.1-or-later

systemd_localed_sources = files(
        'localed-util.c',
        'localed.c',
        'xkbcommon-util.c',
)

localectl_sources = files('localectl.c')

# logind will load libxkbcommon.so dynamically on its own, but we still need to
# specify where the headers are.
if conf.get('HAVE_XKBCOMMON') == 1
        libxkbcommon_deps = [
                libdl,
                libxkbcommon.partial_dependency(compile_args: true),
        ]
else
        libxkbcommon_deps = []
endif

executables += [
        libexec_template + {
                'name' : 'systemd-localed',
                'dbus' : true,
                'conditions' : ['ENABLE_LOCALED'],
                'sources' : systemd_localed_sources,
                'dependencies' : libxkbcommon_deps,
        },
        executable_template + {
                'name' : 'localectl',
                'public' : true,
                'conditions' : ['ENABLE_LOCALED'],
                'sources' : files('localectl.c'),
        },
        test_template + {
                'sources' : files(
                        'test-localed-util.c',
                        'localed-util.c',
                        'xkbcommon-util.c',
                ),
                'dependencies' : libxkbcommon_deps,
        },
]

# If you know a way that allows the same variables to be used
# in sources list and concatenated to a string for test_env,
# let me know.
kbd_model_map = meson.current_source_dir() / 'kbd-model-map'
language_fallback_map = meson.current_source_dir() / 'language-fallback-map'

if conf.get('ENABLE_LOCALED') == 1
        install_data('org.freedesktop.locale1.conf',
                     install_dir : dbuspolicydir)
        install_data('org.freedesktop.locale1.service',
                     install_dir : dbussystemservicedir)
        install_data('org.freedesktop.locale1.policy',
                     install_dir : polkitpolicydir)
        install_data('kbd-model-map',
                     'language-fallback-map',
                     install_dir : pkgdatadir)
endif