Make clutter optional for build.

This commit is contained in:
Daiki Ueno
2010-06-18 17:24:32 +09:00
parent 0415004379
commit e0c9319339
9 changed files with 104 additions and 82 deletions

View File

@ -16,13 +16,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
INCLUDES = -I$(top_srcdir) $(CLUTTER_CFLAGS) $(GOBJECT2_CFLAGS) $(GTK2_CFLAGS) $(XKB_CFLAGS)
INCLUDES = -I$(top_srcdir) $(GOBJECT2_CFLAGS) $(GTK2_CFLAGS) $(XKB_CFLAGS)
TESTS = eek-simple-test eek-xkb-test
noinst_PROGRAMS = $(TESTS)
eek_simple_test_SOURCES = eek-simple-test.c
eek_simple_test_LDADD = $(top_builddir)/eek/libeek.la $(top_builddir)/eek/libeek-clutter.la
eek_simple_test_LDADD = $(top_builddir)/eek/libeek.la
eek_xkb_test_SOURCES = eek-xkb-test.c
eek_xkb_test_LDADD = $(top_builddir)/eek/libeek.la $(top_builddir)/eek/libeek-xkb.la

View File

@ -18,7 +18,6 @@
* 02110-1301 USA
*/
#include "eek.h"
#include "eek-clutter.h"
static void
test_create (void)
@ -37,38 +36,11 @@ test_create (void)
g_assert (EEK_IS_KEY(key1));
}
#if 0
static void
test_create_clutter (void)
{
EekKeyboard *keyboard;
EekSection *section;
EekKey *key0, *key1;
ClutterActor *actor;
keyboard = eek_clutter_keyboard_new (640.0, 480.0);
section = eek_keyboard_create_section (keyboard);
g_assert (EEK_IS_SECTION(section));
eek_section_add_row (section, 2, EEK_ORIENTATION_HORIZONTAL);
key0 = eek_section_create_key (section, 0, 0);
g_assert (EEK_IS_KEY(key0));
key1 = eek_section_create_key (section, 1, 0);
g_assert (EEK_IS_KEY(key1));
actor = eek_clutter_keyboard_get_actor (EEK_CLUTTER_KEYBOARD(keyboard));
g_assert (CLUTTER_IS_ACTOR(actor));
g_object_unref (keyboard);
}
#endif
int
main (int argc, char **argv)
{
g_type_init ();
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/eek-simple-test/create", test_create);
#if 0
clutter_init (&argc, &argv);
g_test_add_func ("/eek-simple-test/create-clutter", test_create_clutter);
#endif
return g_test_run ();
}