diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-04-23 14:59:30 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-04-25 09:52:30 +0200 |
commit | cb98a5313a4841a9da943b87f94beca5ca32578a (patch) | |
tree | ef6cab9768cd29bf9935d54fe99b9b547360fe43 /examples | |
parent | 715d9dd9b715cd3d367fe3a1fb3ce6c79941ecb8 (diff) |
Add support for building cairomm with Meson
cairomm can be built with either Autotools or Meson.
Fixes #20
Diffstat (limited to 'examples')
-rw-r--r-- | examples/meson.build | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/meson.build b/examples/meson.build new file mode 100644 index 0000000..1f60aea --- /dev/null +++ b/examples/meson.build @@ -0,0 +1,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 |