ptp-helper: Don't check for a Rust compiler on unsupported platforms

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4410>
This commit is contained in:
Sebastian Dröge 2023-04-13 15:21:20 +03:00 committed by GStreamer Marge Bot
parent b35d598003
commit 7cba04f2c6

View file

@ -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')