various: check meson feature flag early
Prompted by https://github.com/systemd/systemd/pull/35110#discussion_r1835885340
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if conf.get('HAVE_LIBCRYPTSETUP') != 1
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
subdir('cryptsetup-tokens')
|
||||
|
||||
systemd_cryptsetup_sources = files(
|
||||
@@ -15,7 +19,6 @@ executables += [
|
||||
executable_template + {
|
||||
'name' : 'systemd-cryptsetup',
|
||||
'public' : true,
|
||||
'conditions' : ['HAVE_LIBCRYPTSETUP'],
|
||||
'sources' : systemd_cryptsetup_sources,
|
||||
'dependencies' : [
|
||||
libcryptsetup,
|
||||
@@ -25,14 +28,11 @@ executables += [
|
||||
},
|
||||
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
|
||||
# symlink for backwards compatibility after rename
|
||||
meson.add_install_script(sh, '-c',
|
||||
ln_s.format(bindir / 'systemd-cryptsetup',
|
||||
libexecdir / 'systemd-cryptsetup'))
|
||||
|
||||
Reference in New Issue
Block a user