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

subdir('cryptsetup-tokens')

systemd_cryptsetup_sources = files(
        'cryptsetup-keyfile.c',
        'cryptsetup.c',
)

if conf.get('HAVE_P11KIT') == 1
        systemd_cryptsetup_sources += files('cryptsetup-pkcs11.c')
endif

if conf.get('HAVE_TPM2') == 1
        systemd_cryptsetup_sources += files('cryptsetup-tpm2.c')
endif

executables += [
        executable_template + {
                'name' : 'systemd-cryptsetup',
                'public' : true,
                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                'sources' : systemd_cryptsetup_sources,
                'dependencies' : [
                        libcryptsetup,
                        libopenssl,
                        libp11kit_cflags,
                ],
        },
        generator_template + {
                'name' : 'systemd-cryptsetup-generator',
                'conditions' : ['HAVE_LIBCRYPTSETUP'],
                'sources' : files('cryptsetup-generator.c'),
        },
]

if conf.get('HAVE_LIBCRYPTSETUP') == 1
        # symlink for backwards compatibility after rename
        meson.add_install_script(sh, '-c',
                                 ln_s.format(bindir / 'systemd-cryptsetup',
                                             libexecdir / 'systemd-cryptsetup'))
endif