-
Notifications
You must be signed in to change notification settings - Fork 3
/
meson.build
51 lines (42 loc) · 1.39 KB
/
meson.build
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
46
47
48
49
50
51
project('spngt', 'c',
version : '1.0',
meson_version : '>= 0.55.0',
default_options : [
'c_std=c99',
'buildtype=release'
]
)
if get_option('benchmarks') == false
subdir_done()
endif
spngt_deps = [
dependency('lua'),
dependency('spng'),
dependency('libpng'),
dependency('stb'),
dependency('lodepng'),
dependency('wuffs'),
]
spngt_src = files(
'spngt.c',
'spngt_lua.c',
'spngt_libpng.c',
'spngt_spng.c',
'spngt_lodepng.c',
'spngt_stb.c',
'spngt_wuffs.c',
)
spngt_exe = executable('spngt', spngt_src, dependencies : spngt_deps)
benchmark('info', spngt_exe, args : 'info')
images = subproject('benchmark_images').get_variable('all_images')
tango_icons = subproject('tango_icons').get_variable('png_icons')
kodak_images = subproject('kodakimages').get_variable('all_images')
benchmark('tango', spngt_exe, suite : [ 'extended', 'icons' ], args : [ files('main.lua'), 'tango', tango_icons])
benchmark('kodak', spngt_exe, suite : [ 'extended', 'photos' ], args : [ files('main.lua'), 'kodak', kodak_images])
benchmark('mixed', spngt_exe, suite : [ 'extended', 'photos' ], args : [ files('main.lua'), 'mixed', images])
foreach img : images
benchmark('image_decode', spngt_exe, suite : 'decode', args : img)
endforeach
foreach img : images
benchmark('image_encode', spngt_exe, suite : 'encode', args : [ img, 'enc' ])
endforeach