aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/240 dependency native host == build/meson.build
blob: bdcd93cef0ae3927596f5c6c02078783c600cf44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
project('foo', 'c')

if meson.is_cross_build()
  error('MESON_SKIP_TEST Test does not make sense for cross builds')
endif

dep_zlib = dependency('zlib', required : false)
if not dep_zlib.found()
  error('MESON_SKIP_TEST Test requires zlib')
endif
dependency('zlib', native : true, required : false)
dependency('zlib', native : false)

# `native: true` should not make a difference when doing a native build.
meson.override_dependency('expat', declare_dependency())
dependency('expat')
dependency('expat', native : true)
dependency('expat', native : false)