summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-06-18 01:20:18 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-06-18 01:20:18 +0100
commitfde86351b4f62677789af9d0649ba50efa3ced9d (patch)
tree9d6850b1db4ff3de72325c3831f1b163e4f7714d /doc
parent6d65aeb1f40e3ed06b65e1e67c8ba103666ac27b (diff)
downloadclutter-fde86351b4f62677789af9d0649ba50efa3ced9d.tar.gz
build: Compile and install the cookbook examples
We must build the examples and install their sources with the Meson build as well as the Autotools one.
Diffstat (limited to 'doc')
-rw-r--r--doc/cookbook/examples/meson.build84
-rw-r--r--doc/cookbook/meson.build2
2 files changed, 86 insertions, 0 deletions
diff --git a/doc/cookbook/examples/meson.build b/doc/cookbook/examples/meson.build
new file mode 100644
index 000000000..fef4828af
--- /dev/null
+++ b/doc/cookbook/examples/meson.build
@@ -0,0 +1,84 @@
+examples_dir = join_paths(clutter_datadir, clutter_api_name, 'cookbook', 'examples')
+
+all_examples = [
+ ['actors-composite-main', ['cb-button.c'], ['cb-button.h']],
+ ['animations-complex'],
+ ['animations-looping-animator'],
+ ['animations-looping-implicit'],
+ ['animations-looping-state'],
+ ['animations-moving-animator'],
+ ['animations-moving-implicit'],
+ ['animations-moving-state'],
+ ['animations-path'],
+ ['animations-path-circle'],
+ ['animations-reuse'],
+ ['animations-rotating'],
+ ['animations-scaling'],
+ ['animations-scaling-zoom'],
+ ['effects-basic', ['cb-border-effect.c', 'cb-background-effect.c'], ['cb-border-effect.h', 'cb-background-effect.h']],
+ ['effects-built-in'],
+ ['effects-custom-deform', ['cb-page-fold-effect.c'], ['cb-page-fold-effect.h']],
+ ['events-buttons'],
+ ['events-buttons-click'],
+ ['events-buttons-lasso'],
+ ['events-mouse-scroll'],
+ ['events-pointer-motion'],
+ ['events-pointer-motion-crossing'],
+ ['events-pointer-motion-stacked'],
+ ['events-pointer-motion-scribbler'],
+ ['layouts-bind-constraint-allocation'],
+ ['layouts-bind-constraint-overlay'],
+ ['layouts-bind-constraint-stage'],
+ ['layouts-box'],
+ ['layouts-box-menu'],
+ ['layouts-box-property-effects'],
+ ['layouts-stacking'],
+ ['layouts-stacking-diff-sized-actors'],
+ ['script-ui'],
+ ['script-signals'],
+ ['script-states'],
+ ['text-shadow'],
+ ['textures-crossfade'],
+ ['textures-crossfade-cogl'],
+ ['textures-crossfade-slideshow'],
+ ['textures-reflection'],
+ ['textures-split-go'],
+ ['textures-sub-texture'],
+]
+
+example_data = []
+foreach e: all_examples
+ example_src = [ e[0] + '.c' ] + e.get(1, [])
+ example_bin = executable(e[0],
+ example_src,
+ dependencies: [libclutter_dep, mathlib_dep],
+ c_args: [
+ '-DG_DISABLE_SINGLE_INCLUDES',
+ '-DGLIB_DISABLE_DEPRECATION_WARNINGS',
+ '-DCOGL_DISABLE_DEPRECATION_WARNINGS',
+ '-DCLUTTER_DISABLE_DEPRECATION_WARNINGS',
+ ],
+ link_args: ['-export-dynamic'],
+ )
+
+ example_data += files(example_src, e.get(2, []))
+endforeach
+
+ui_data = [
+ 'animations-complex.json',
+ 'animations-complex-overlapping.json',
+ 'animations-reuse-animation.json',
+ 'animations-reuse-ui.json',
+ 'script-signals.json',
+ 'script-states.json',
+ 'script-ui.json',
+]
+
+img_data = [
+ 'redhand.png',
+ 'smiley.png',
+]
+
+install_data(example_data + ui_data + img_data,
+ install_dir: examples_dir,
+)
diff --git a/doc/cookbook/meson.build b/doc/cookbook/meson.build
index 8c2ea66b5..a23f725f0 100644
--- a/doc/cookbook/meson.build
+++ b/doc/cookbook/meson.build
@@ -1,3 +1,5 @@
+subdir('examples')
+
xml_files = [
'actors.xml',
'animations.xml',