summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-12-14 15:35:44 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-01-25 12:36:20 +0000
commit59318edf6419afb850b7875ffee4d97522449a5a (patch)
treea0164f71d36748fb6059d81809b4eeddbd657109 /test
parent08cc4d021dc523c4243a23b2b4ba432af760716b (diff)
downloadlibepoxy-59318edf6419afb850b7875ffee4d97522449a5a.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/meson.build3
1 files changed, 3 insertions, 0 deletions
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