[glib/glib-2-60: 2/4] build: Refactor resources test build instructions



commit 63f42284fa01348dac29dd46e5ac825f2ba7850b
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Apr 3 16:45:58 2019 +0100

    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

 gio/tests/meson.build | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index d215d4e4c..61320cb47 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -551,6 +551,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'
@@ -597,21 +606,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]