summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-02-15 11:38:40 -0800
committerDylan Baker <dylan@pnwbakers.com>2023-02-16 09:13:52 -0800
commit48c9ec2fe18ff626581283517138ce82e442e2d4 (patch)
tree7058850912862ff6495da1935fe2165645389f68 /docs
parent295111d909a9469032b178606e978fd906e8eaf2 (diff)
downloadmeson-48c9ec2fe18ff626581283517138ce82e442e2d4.tar.gz
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.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Shipping-prebuilt-binaries-as-wraps.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/markdown/Shipping-prebuilt-binaries-as-wraps.md b/docs/markdown/Shipping-prebuilt-binaries-as-wraps.md
index 44194e7bd..e8adb4444 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()),