From 7cba04f2c6bbc35785c52bc546d15fbd3b4244f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 13 Apr 2023 15:21:20 +0300 Subject: [PATCH] ptp-helper: Don't check for a Rust compiler on unsupported platforms Part-of: --- .../gstreamer/libs/gst/helpers/ptp/meson.build | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/subprojects/gstreamer/libs/gst/helpers/ptp/meson.build b/subprojects/gstreamer/libs/gst/helpers/ptp/meson.build index 76cac29391..8f9339eeef 100644 --- a/subprojects/gstreamer/libs/gst/helpers/ptp/meson.build +++ b/subprojects/gstreamer/libs/gst/helpers/ptp/meson.build @@ -1,16 +1,19 @@ # Check PTP support -have_rust = add_languages('rust', native : false, required : false) have_ptp = true -if not have_rust - have_ptp = false - message('PTP not supported without Rust compiler') -endif -if not ['linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly', 'darwin', 'sunos', 'solaris', 'illumos', 'windows'].contains(host_system) +if host_system not in ['linux', 'freebsd', 'openbsd', 'netbsd', 'dragonfly', 'darwin', 'sunos', 'solaris', 'illumos', 'windows'] have_ptp = false message('PTP not supported on this OS') endif +if have_ptp + have_rust = add_languages('rust', native : false, required : false) + if not have_rust + have_ptp = false + message('PTP not supported without Rust compiler') + endif +endif + if have_ptp rustc = meson.get_compiler('rust')