summaryrefslogtreecommitdiffstats
path: root/test cases/unit/45 native dep pkgconfig var/meson.build
blob: d95dbcdbeee701f232095fc0ae40bd026f7718c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
project('native dep pkgconfig test')

if get_option('start_native')
  dep_native = dependency('dep_tester', native: true, method: 'pkg-config')
  dep_cross = dependency('dep_tester', native: false, method: 'pkg-config')
else
  dep_cross = dependency('dep_tester', native: false, method: 'pkg-config')
  dep_native = dependency('dep_tester', native: true, method: 'pkg-config')
endif

dep_type = dep_native.get_pkgconfig_variable('dep_type')
assert(dep_type == 'native', 'Expected native')

dep_type = dep_cross.get_pkgconfig_variable('dep_type')
assert(dep_type == 'cross', 'Expected cross')