summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2019-04-03 16:45:58 +0100
committerPhilip Withnall <withnall@endlessm.com>2019-04-12 18:00:12 +0100
commitea8e6502d4d4a56ed05c47812546e71f8e4909fb (patch)
treed5fdc88a30e3a0d154e925ad1df5df5db3460f13
parenta06d7cc7b8b99b80d863dfec23365cdcba2bc511 (diff)
downloadglib-ea8e6502d4d4a56ed05c47812546e71f8e4909fb.tar.gz
build: Refactor resources test build instructions
This introduces no functional changes, but combines two duplicated lists and makes the meson.build file a little easier to follow. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1711
-rw-r--r--gio/tests/meson.build33
1 files changed, 19 insertions, 14 deletions
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 00e32c341..29221013e 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -557,6 +557,15 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
copy : true,
install : false)
+ resources_extra_sources = [
+ test_gresource,
+ test_resources_c,
+ test_resources2_c,
+ test_resources2_h,
+ digit_test_resources_c,
+ digit_test_resources_h,
+ ]
+
# Create object file containing resource data
# for testing the external data option
if build_machine.system() == 'linux'
@@ -603,21 +612,17 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
'@INPUT@',
'@OUTPUT@'])
- gio_tests += {
- 'resources' : {
- 'extra_sources' : [test_gresource, test_resources_c, test_resources2_c,
- test_resources2_h, test_resources_binary_c,
- test_resources_binary2, digit_test_resources_c, digit_test_resources_h],
- },
- }
- else
- gio_tests += {
- 'resources' : {
- 'extra_sources' : [test_gresource, test_resources_c, test_resources2_c,
- test_resources2_h, digit_test_resources_c, digit_test_resources_h],
- },
- }
+ resources_extra_sources += [
+ test_resources_binary_c,
+ test_resources_binary2,
+ ]
endif
+
+ gio_tests += {
+ 'resources' : {
+ 'extra_sources' : resources_extra_sources,
+ },
+ }
endif
foreach test_name, extra_args : gio_tests