diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-05-26 12:49:44 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-05-26 12:54:02 +0100 |
commit | 2f047ce341df41d2d34801dc6262a5ae77487a31 (patch) | |
tree | 05f96da173bd20547bc27ca9a6bafb83896cb18e /examples/gtk-clutter-events.c | |
parent | ed9e0a39129ba3e675933d1a1a4552a0a5fbbfc7 (diff) | |
download | clutter-gtk-2f047ce341df41d2d34801dc6262a5ae77487a31.tar.gz |
Allow running examples in non-srcdir builds
If we build the examples in a build directory we still want to be able
to access the ancillary data files.
Diffstat (limited to 'examples/gtk-clutter-events.c')
-rw-r--r-- | examples/gtk-clutter-events.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/gtk-clutter-events.c b/examples/gtk-clutter-events.c index d357b78..a433af5 100644 --- a/examples/gtk-clutter-events.c +++ b/examples/gtk-clutter-events.c @@ -3,6 +3,10 @@ #include <clutter-gtk/clutter-gtk.h> +#ifndef EXAMPLES_DATADIR +#define EXAMPLES_DATADIR "." +#endif + typedef struct { GtkWidget *window; @@ -181,7 +185,7 @@ main (gint argc, gchar **argv) NULL); /* Create the main texture that the spin buttons manipulate */ - pixbuf = gdk_pixbuf_new_from_file ("redhand.png", NULL); + pixbuf = gdk_pixbuf_new_from_file (EXAMPLES_DATADIR G_DIR_SEPARATOR_S "redhand.png", NULL); if (pixbuf == NULL) g_error ("Unable to load pixbuf\n"); |