From cca3a06cab2622da0f81b360d336270f34cb19d8 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 3 Feb 2014 13:12:33 +0200 Subject: [PATCH] build: pass client flags to test programs Fix build failures of the kind: CC tests/bad-buffer-test.o In file included from tests/weston-test-client-helper.h:28:0, from tests/bad-buffer-test.c:28: ./protocol/wayland-test-client-protocol.h:35:28: fatal error: wayland-client.h: No such file or directory compilation terminated. make[1]: *** [tests/bad-buffer-test.o] Error 1 These are only triggerable if libwayland has not been installed system-wide, but only in a custom prefix. Since the Makefile already uses AM_CPPFLAGS, simply add TEST_CLIENT_CFLAGS to test programs instead of dropping AM_CPPFLAGS. Signed-off-by: Pekka Paalanen --- Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.am b/Makefile.am index 753ff83c..1de22c96 100644 --- a/Makefile.am +++ b/Makefile.am @@ -834,27 +834,34 @@ libtest_client_la_SOURCES = \ nodist_libtest_client_la_SOURCES = \ protocol/wayland-test-protocol.c \ protocol/wayland-test-client-protocol.h +libtest_client_la_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la bad_buffer_weston_SOURCES = tests/bad-buffer-test.c +bad_buffer_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) bad_buffer_weston_LDADD = libtest-client.la keyboard_weston_SOURCES = tests/keyboard-test.c +keyboard_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) keyboard_weston_LDADD = libtest-client.la event_weston_SOURCES = tests/event-test.c +event_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) event_weston_LDADD = libtest-client.la button_weston_SOURCES = tests/button-test.c +button_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) button_weston_LDADD = libtest-client.la text_weston_SOURCES = tests/text-test.c nodist_text_weston_SOURCES = \ protocol/text-protocol.c \ protocol/text-client-protocol.h +text_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) text_weston_LDADD = libtest-client.la subsurface_weston_SOURCES = tests/subsurface-test.c +subsurface_weston_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CLIENT_CFLAGS) subsurface_weston_LDADD = libtest-client.la if ENABLE_EGL