From 48c9ec2fe18ff626581283517138ce82e442e2d4 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 15 Feb 2023 11:38:40 -0800 Subject: docs/prebuilt: add some sanity checking to the example. Instead of just giving a note about about how this is best practice, actually do it. --- docs/markdown/Shipping-prebuilt-binaries-as-wraps.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/markdown') diff --git a/docs/markdown/Shipping-prebuilt-binaries-as-wraps.md b/docs/markdown/Shipping-prebuilt-binaries-as-wraps.md index 44194e7..e8adb44 100644 --- a/docs/markdown/Shipping-prebuilt-binaries-as-wraps.md +++ b/docs/markdown/Shipping-prebuilt-binaries-as-wraps.md @@ -16,6 +16,11 @@ library at the top level and headers in a subdirectory called ```meson project('bob', 'c') +# Do some sanity checking so that meson can fail early instead of at final link time +if not (host_machine.system() == 'windows' or host_machine.cpu_family() == 'x86_64') + error('This wrap of libbob is a binary wrap for x64_64 Windows, and will not work on your system') +endif + cc = meson.get_compiler('c') bob_dep = declare_dependency( dependencies : cc.find_library('bob', dirs : meson.current_source_dir()), -- cgit v1.1