From 59318edf6419afb850b7875ffee4d97522449a5a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 14 Dec 2016 15:35:44 +0000 Subject: build: Rework the build rules for generated files in Meson Instead of using a generator and having to deal with tweaking the inclusion paths, we can use a custom target rule, which will do the right thing and put the generate files where we expect them to be. Due to how Meson and Ninja work we need to be a bit more careful as to how we deal with dependencies and generated files, especially since Epoxy is built on the assumption that the only inclusion path for the headers lies under the 'include' sub-directory. First of all, we need to split the dispatch table generation into two separate steps, one for the headers and one for the source files. Additionally, we need to munge the paths of the non-generated headers so that we reference them by their correct path. These changes are necessary to ensure that Epoxy can be built on a system without Epoxy installed already; the previous Meson-based build system relied on the headers being installed in a system directory. --- test/meson.build | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/meson.build b/test/meson.build index eaf3952..857a980 100644 --- a/test/meson.build +++ b/test/meson.build @@ -11,10 +11,12 @@ test_cflags = common_cflags + [ test('header_guards', executable('header guards', 'headerguards.c', c_args: common_cflags, + dependencies: libepoxy_dep, include_directories: libepoxy_inc)) test('misc_defines', executable('misc defines', 'miscdefines.c', c_args: common_cflags, + dependencies: libepoxy_dep, include_directories: libepoxy_inc)) test('khronos_typedefs', executable('khronos typedefs', [ @@ -23,6 +25,7 @@ test('khronos_typedefs', 'khronos_typedefs_nonepoxy.c', ], c_args: common_cflags, + dependencies: libepoxy_dep, include_directories: libepoxy_inc)) if build_egl and build_x11_tests -- cgit v1.2.1