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.
pull/11388/head
Dylan Baker 2 years ago
parent 295111d909
commit 48c9ec2fe1
  1. 5
      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()),

Loading…
Cancel
Save