Debian Codegraph @

vendored-meson/meson/test cases/common/230 external project/meson.build

raw
1 project('test external project', 'c')
2
3 if not find_program('pkg-config', required: false).found()
4 error('MESON_SKIP_TEST: pkg-config not found')
5 endif
6
7 if not find_program('make', required : false).found()
8 error('MESON_SKIP_TEST: make not found')
9 endif
10
11 if host_machine.system() == 'windows'
12 error('MESON_SKIP_TEST: The fake configure script is too dumb to work on Windows')
13 endif
14
15 if meson.is_cross_build()
16 # CI uses PKG_CONFIG_SYSROOT_DIR which breaks -uninstalled.pc usage.
17 error('MESON_SKIP_TEST: Cross build support is too limited for this test')
18 endif
19
20 pkg = import('pkgconfig')
21
22 somelib = library('somelib', 'func.c')
23 pkg.generate(somelib)
24
25 subdir('libfoo')
26
27 executable('test-find-library', 'app.c', dependencies : libfoo_dep)