summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@siemens.com>2022-07-22 12:19:44 +0200
committerThomas Haller <thaller@redhat.com>2022-07-22 12:40:26 +0200
commitbe0daab3e3a9da9f995a4d13db63f26e868d8f06 (patch)
treec91be644582914416124981c397a52d56562f916
parent7c04f5732005ba1974354433818a6ce14e0fd3a1 (diff)
downloadNetworkManager-be0daab3e3a9da9f995a4d13db63f26e868d8f06.tar.gz
build/meson: cross compile fix distro
In case of cross compilation the target distro is not the same as the distro of the build machine. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1309
-rw-r--r--meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 18747fa9c4..5a93a623ef 100644
--- a/meson.build
+++ b/meson.build
@@ -287,7 +287,9 @@ glib_dep = declare_dependency(
]
)
-if run_command('test', '-e', '/etc/sysconfig/network-scripts').returncode() == 0
+if meson.is_cross_build()
+ distro = 'unknown'
+elif run_command('test', '-e', '/etc/sysconfig/network-scripts').returncode() == 0
distro = 'redhat'
elif run_command('test', '-e', '/etc/SuSE-release').returncode() == 0
distro = 'suse'