meson.build 993 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
gidl_sources = files(
	'gidlmodule.c',
	'gidlnode.c',
	'gidlparser.c',
	'gmetadata.c',
)

gidl_lib = static_library('gidl',
	gidl_sources,
	dependencies: [gobject_dep, gmodule_dep])

gidl_dep = declare_dependency(
	link_with: [gidl_lib],
	include_directories: include_directories('.'),
)

flex = find_program('flex')
bison = find_program('bison')

lgen = generator(flex,
	output: '@PLAINNAME@.c',
	arguments: ['-o', '@OUTPUT@', '@INPUT@'])

lfiles = lgen.process('scannerlexer.l')

pgen = generator(bison,
	output: ['@BASENAME@.c', '@BASENAME@.h'],
	arguments: ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'],
)

pfiles = pgen.process('scannerparser.y')

gen_introspect_sources = files(
	'gidlwriter.c',
	'scanner.c',
)

gen_introspect_name = 'gen-introspect@0@'.format(vala_version_suffix)

gen_introspect_exe = executable(gen_introspect_name,
	[gen_introspect_sources, lfiles, pfiles],
	install: true,
	install_dir: pkglibdir,
	dependencies: [gobject_dep, gmodule_dep, gidl_dep],
)