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', '-ffast-math', '-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', 'otfpriv.h.in', ], output: [ 'otf.c', 'otf.h', 'otfpriv.h', ], command: [ racket, '@SOURCE_ROOT@/gen.rkt', '--for-posix', 'true', '--in-dir', '@SOURCE_ROOT@', ],) src = [ 'rast.c', 'unix/otfsys.c', 'unix/rune.c', 'unix/test.c',] cc = meson.get_compiler('c')math = cc.find_library('m', required: false)if cc.get_id() == 'clang' add_project_arguments( '-Wno-mathematical-notation-identifier-extension', language: 'c', )endif executable( 'fntest', sources: [ src, src_gen, ], include_directories: include_directories( 'unix', ), dependencies: [ math, ],)
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',
'-ffast-math',
'-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',
'otfpriv.h.in',
],
output: [
'otf.c',
'otf.h',
'otfpriv.h',
],
command: [
racket, '@SOURCE_ROOT@/gen.rkt',
'--for-posix', 'true',
'--in-dir', '@SOURCE_ROOT@',
],
)
src = [
'rast.c',
'unix/otfsys.c',
'unix/rune.c',
'unix/test.c',
]
cc = meson.get_compiler('c')
math = cc.find_library('m', required: false)
if cc.get_id() == 'clang'
add_project_arguments(
'-Wno-mathematical-notation-identifier-extension',
language: 'c',
)
endif
executable(
'fntest',
sources: [
src,
src_gen,
],
include_directories: include_directories(
'unix',
),
dependencies: [
math,
],
)