meson: fix compilation with -Dnetworkd=false, -Dkmod=no, -Dlibgcrypt=no
The tests are included under the conditional too, instead of specifying 'ENABLE_NETWORKD' in the test definition array, because libnetworkd_core dependency is undefined if networkd is disabled.
This commit is contained in:
parent
421f001277
commit
f0bd7cc701
46
meson.build
46
meson.build
|
@ -855,7 +855,7 @@ if want_importd != 'no'
|
||||||
conf.get('HAVE_ZLIB', 0) == 1 and
|
conf.get('HAVE_ZLIB', 0) == 1 and
|
||||||
conf.get('HAVE_BZIP2', 0) == 1 and
|
conf.get('HAVE_BZIP2', 0) == 1 and
|
||||||
conf.get('HAVE_XZ', 0) == 1 and
|
conf.get('HAVE_XZ', 0) == 1 and
|
||||||
conf.get('HAVE_LZ4', 0) == 1)
|
conf.get('HAVE_LIBGCRYPT', 0) == 1)
|
||||||
if have_deps
|
if have_deps
|
||||||
conf.set('ENABLE_IMPORTD', 1)
|
conf.set('ENABLE_IMPORTD', 1)
|
||||||
elif want_importd == 'yes'
|
elif want_importd == 'yes'
|
||||||
|
@ -2030,28 +2030,30 @@ executable('systemd-nspawn',
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true)
|
install : true)
|
||||||
|
|
||||||
executable('systemd-networkd',
|
if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||||
systemd_networkd_sources,
|
executable('systemd-networkd',
|
||||||
include_directories : includes,
|
systemd_networkd_sources,
|
||||||
link_with : [libnetworkd_core,
|
include_directories : includes,
|
||||||
libfirewall,
|
link_with : [libnetworkd_core,
|
||||||
libsystemd_network,
|
libfirewall,
|
||||||
libudev_internal,
|
libsystemd_network,
|
||||||
libshared,
|
libudev_internal,
|
||||||
libsystemd_internal],
|
libshared,
|
||||||
install_rpath : rootlibexecdir,
|
libsystemd_internal],
|
||||||
install : true,
|
install_rpath : rootlibexecdir,
|
||||||
install_dir : rootlibexecdir)
|
install : true,
|
||||||
|
install_dir : rootlibexecdir)
|
||||||
|
|
||||||
executable('systemd-networkd-wait-online',
|
executable('systemd-networkd-wait-online',
|
||||||
systemd_networkd_wait_online_sources,
|
systemd_networkd_wait_online_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
link_with : [libnetworkd_core,
|
link_with : [libnetworkd_core,
|
||||||
libshared,
|
libshared,
|
||||||
libsystemd_internal],
|
libsystemd_internal],
|
||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
|
endif
|
||||||
|
|
||||||
executable('networkctl',
|
executable('networkctl',
|
||||||
networkctl_sources,
|
networkctl_sources,
|
||||||
|
|
|
@ -110,33 +110,33 @@ if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||||
install_dir : dbussystemservicedir)
|
install_dir : dbussystemservicedir)
|
||||||
install_data('systemd-networkd.rules',
|
install_data('systemd-networkd.rules',
|
||||||
install_dir : polkitrulesdir)
|
install_dir : polkitrulesdir)
|
||||||
endif
|
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/network/test-networkd-conf.c'],
|
[['src/network/test-networkd-conf.c'],
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libsystemd_network,
|
libsystemd_network,
|
||||||
libudev],
|
libudev],
|
||||||
[]],
|
[]],
|
||||||
|
|
||||||
[['src/network/test-network.c'],
|
[['src/network/test-network.c'],
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libudev_internal,
|
libudev_internal,
|
||||||
libsystemd_network,
|
libsystemd_network,
|
||||||
libsystemd_internal,
|
libsystemd_internal,
|
||||||
libfirewall],
|
libfirewall],
|
||||||
[libiptc]],
|
[libiptc]],
|
||||||
|
|
||||||
[['src/network/test-network-tables.c',
|
[['src/network/test-network-tables.c',
|
||||||
'src/network/test-network-tables.c',
|
'src/network/test-network-tables.c',
|
||||||
test_tables_h],
|
test_tables_h],
|
||||||
[libnetworkd_core,
|
[libnetworkd_core,
|
||||||
libudev_internal,
|
libudev_internal,
|
||||||
libudev_core,
|
libudev_core,
|
||||||
libsystemd_network,
|
libsystemd_network,
|
||||||
libsystemd_internal,
|
libsystemd_internal,
|
||||||
libfirewall],
|
libfirewall],
|
||||||
[],
|
[],
|
||||||
'', '', [],
|
'', '', [],
|
||||||
[network_include_dir] + libudev_core_includes],
|
[network_include_dir] + libudev_core_includes],
|
||||||
]
|
]
|
||||||
|
endif
|
||||||
|
|
|
@ -424,7 +424,7 @@ tests += [
|
||||||
[libshared,
|
[libshared,
|
||||||
libsystemd_internal],
|
libsystemd_internal],
|
||||||
[libkmod],
|
[libkmod],
|
||||||
'', 'manual'],
|
'HAVE_KMOD', 'manual'],
|
||||||
|
|
||||||
[['src/test/test-ellipsize.c'],
|
[['src/test/test-ellipsize.c'],
|
||||||
[libshared],
|
[libshared],
|
||||||
|
|
Loading…
Reference in New Issue