meson: add some support for pulling in testsuite

pull/122/head
William Pitcock 2017-06-20 01:11:36 -05:00
parent 186545fc4f
commit bca827649d
1 changed files with 13 additions and 3 deletions

View File

@ -3,8 +3,10 @@ project('pkgconf', 'c',
license : 'ISC', license : 'ISC',
meson_version : '>=0.40') meson_version : '>=0.40')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
cdata = configuration_data() cdata = configuration_data()
check_headers = [ check_headers = [
['HAVE_DLFCN_H', 'dlfcn.h'], ['HAVE_DLFCN_H', 'dlfcn.h'],
@ -41,10 +43,11 @@ endforeach
cdata.set_quoted('SYSTEM_LIBDIR', '/fixme') cdata.set_quoted('SYSTEM_LIBDIR', '/fixme')
cdata.set_quoted('SYSTEM_INCLUDEDIR', '/fixme') cdata.set_quoted('SYSTEM_INCLUDEDIR', '/fixme')
cdata.set_quoted('PKG_DEFAULT_PATH', '/fixme') cdata.set_quoted('PKG_DEFAULT_PATH', '/fixme')
cdata.set_quoted('PACKAGE_NAME', 'pkgconf') cdata.set_quoted('PACKAGE_NAME', meson.project_name())
cdata.set_quoted('PACKAGE_VERSION', meson.project_version()) cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
cdata.set_quoted('PACKAGE_BUGREPORT', 'http://github.com/pkgconf/pkgconf/issues') cdata.set_quoted('PACKAGE_BUGREPORT', 'http://github.com/pkgconf/pkgconf/issues')
cdata.set('abs_top_srcdir', meson.source_root())
cdata.set('abs_top_builddir', meson.build_root())
subdir('libpkgconf') subdir('libpkgconf')
@ -67,10 +70,17 @@ libpkgconf = shared_library('pkgconf',
soversion : '2', soversion : '2',
) )
pkgconf_bin = executable('pkgconf',
pkgconf_exe = executable('pkgconf',
'main.c', 'main.c',
'getopt_long.c', 'getopt_long.c',
link_with : libpkgconf, link_with : libpkgconf,
install : true) install : true)
kyua_exe = find_program('kyua')
test('kyua', kyua_exe, args : ['--config=none', 'test', '--kyuafile=' + meson.build_root() + '/Kyuafile', '--build-root=' + meson.build_root()])
configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata)
install_man('pkgconf.1') install_man('pkgconf.1')