From 299647f970a5123e9f462327214c11ec758822d6 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Wed, 24 Jul 2019 14:58:39 +0800 Subject: build: Include generated sources in declared dependencies Sometimes ninja decides to compile tests/interactive-panels/main.c, which requires shell/resources.h, before shell/resources.h is generated. The fix is to use 'sources' argument of declare_dependency to properly declare the dependency on generated headers. A fix for tests/datetime and panels/datetime is also included in the commit to fix a similar problem. Closes https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/472 --- tests/datetime/meson.build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/datetime/meson.build b/tests/datetime/meson.build index 3e7a37851..c9f07877c 100644 --- a/tests/datetime/meson.build +++ b/tests/datetime/meson.build @@ -5,7 +5,6 @@ test_units = [ 'test-endianess', ] -includes = [top_inc, include_directories('../../panels/datetime')] env = [ 'G_MESSAGES_DEBUG=all', 'BUILDDIR=' + meson.current_build_dir(), @@ -22,9 +21,7 @@ foreach unit: test_units exe = executable( unit, [unit + '.c'], - include_directories : includes, - dependencies : common_deps + [m_dep], - link_with : [datetime_panel_lib], + dependencies : common_deps + [m_dep, datetime_panel_lib_dep], c_args : cflags ) endforeach -- cgit v1.2.1