shithub: fnt

ref: 0d17a04bbcbb6ee26415d356f40e75d891c5f016
dir: /meson.build/

View raw version
project(
	'fnt',
	'c',
	version: '0.1',
	default_options: [
		'c_std=c2x',
		'warning_level=3',
		'buildtype=debugoptimized',
	],
)

add_project_arguments(
	'-Werror=strict-aliasing',
	'-Wno-pedantic',
	'-Wno-parentheses',
	'-Wno-incompatible-pointer-types',
	'-Wno-sign-compare',
	'-Wno-unknown-pragmas',
	'-D_DEFAULT_SOURCE',
	language: 'c',
)

racket = find_program('racket')
src_gen = custom_target(
	'gen',
	input: [
		'gen.rkt',
		'otf.rkt',
		'otf.c.in',
		'otf.h.in',
	],
	output: [
		'otf.c',
		'otf.h',
	],
	command: [
		racket, '@SOURCE_ROOT@/gen.rkt',
		'--for-posix', 'true',
		'--in-dir', '@SOURCE_ROOT@',
	],
)

src = [
	'rast.c',
	'unix/otfsys.c',
	'unix/test.c',
]

cc = meson.get_compiler('c')
math = cc.find_library('m', required: false)

executable(
	'fntest',
	sources: [
		src,
		src_gen,
	],
	include_directories: include_directories(
		'unix',
	),
	dependencies: [
		math,
	],
)