From ad90beecd34b3a06e58eb1b06f0672c981c97229 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 13 Nov 2017 02:23:00 +1100 Subject: [PATCH] meson.build: Add definition for the [meson build system](http://mesonbuild.com) --- meson.build | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..55e990b --- /dev/null +++ b/meson.build @@ -0,0 +1,28 @@ +project('lua-psl', 'c') + +lua = dependency('lua') +luaversion = lua.version().split('.') +luavdir = luaversion.get(0) + '.' + luaversion.get(1) +lualdir = get_option('datadir') + '/lua/' + luavdir +luacdir = get_option('libdir') + '/lua/' + luavdir + +psl = dependency('psl', required: false) +if not psl.found() + psl = meson.get_compiler('c').find_library('psl') +endif + +shared_module('psl', + ['psl/psl.c'], + name_prefix: 'lua/' + luavdir + '/', + dependencies: [lua, psl], + install: true, + install_dir: luacdir +) + +test('linter', find_program('luacheck'), + args: [meson.current_source_dir()] +) + +test('test suite', find_program('busted'), + workdir: meson.current_source_dir() +)