mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
ptp-helper: Check for the required Rust toolchain version via meson
If an older version is found that gives a more useful output than a compiler error at a later time. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4410>
This commit is contained in:
parent
acdf70e576
commit
b35d598003
1 changed files with 20 additions and 0 deletions
|
@ -13,6 +13,26 @@ endif
|
||||||
|
|
||||||
if have_ptp
|
if have_ptp
|
||||||
rustc = meson.get_compiler('rust')
|
rustc = meson.get_compiler('rust')
|
||||||
|
|
||||||
|
if rustc.get_id() not in ['rustc', 'clippy-driver rustc']
|
||||||
|
message('PTP support is only tested with rustc, found different compiler @0@ @1@'.format(rustc.get_id(), rustc.version()))
|
||||||
|
endif
|
||||||
|
|
||||||
|
# We currently need at least Rust 1.48 on all platforms but Windows.
|
||||||
|
# On Windows some 1.54 API is used that would otherwise complicate things
|
||||||
|
# unncecessarily.
|
||||||
|
rust_req = '1.48'
|
||||||
|
if host_system == 'windows'
|
||||||
|
rust_req = '1.54'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if rustc.get_id() in ['rustc', 'clippy-driver rustc'] and not rustc.version().version_compare('>=' + rust_req)
|
||||||
|
have_ptp = false
|
||||||
|
message('PTP support requires at least Rust @0@ on this platform, found @1@'.format(rust_req, rustc.version()))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if have_ptp
|
||||||
cdata.set('HAVE_PTP', 1, description : 'PTP support available')
|
cdata.set('HAVE_PTP', 1, description : 'PTP support available')
|
||||||
|
|
||||||
ptp_helper_conf_data = configuration_data()
|
ptp_helper_conf_data = configuration_data()
|
||||||
|
|
Loading…
Reference in a new issue