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
|
# examples
# input: cairomm_dep, build_examples
examples = [
# [[dir-name], exe-name, [sources]]
[['surfaces'], 'image-surface', ['image-surface.cc']],
[['surfaces'], 'pdf-surface', ['pdf-surface.cc']],
[['surfaces'], 'ps-surface', ['ps-surface.cc']],
[['surfaces'], 'svg-surface', ['svg-surface.cc']],
[['text'], 'text-rotate', ['text-rotate.cc']],
[['text'], 'toy-text', ['toy-text.cc']],
[['text'], 'user-font', ['user-font.cc']],
]
foreach ex : examples
dir = ''
foreach dir_part : ex[0]
dir = dir / dir_part
endforeach
ex_name = (dir / ex[1]).underscorify()
ex_sources = []
foreach src : ex[2]
ex_sources += dir / src
endforeach
executable(ex_name, ex_sources,
cpp_args: '-DCAIROMM_DISABLE_DEPRECATED',
dependencies: cairomm_dep,
gui_app: false,
build_by_default: build_examples
)
endforeach
|