Move target generation in new function
@@ -267,6 +267,14 @@ class GnomeModule(ExtensionModule):
target_h = GResourceHeaderTarget(args[0] + '_h', state.subdir, state.subproject, h_kwargs)
if gresource_ld_binary:
+ return self._create_gresource_ld_binary_targets(ld, target_g, args, state, g_output, c_name_no_underscores, c_name, objcopy, target_c, target_h)
+ else:
+ rv = [target_c, target_h]
+
+ return ModuleReturnValue(rv, rv)
+
+ def _create_gresource_ld_binary_targets(self, ld, target_g, args, state, g_output, c_name_no_underscores, c_name, objcopy, target_c, target_h):
+
o_kwargs = {
'command': [ld, '-r', '-b', 'binary', '@INPUT@', '-o', '@OUTPUT@'],
'input': target_g,
@@ -333,11 +341,6 @@ class GnomeModule(ExtensionModule):
return ModuleReturnValue(rv1, rv2)
- else:
- rv = [target_c, target_h]
-
- return ModuleReturnValue(rv, rv)
-
def _get_gresource_dependencies(self, state, input_file, source_dirs, dependencies):
cmd = ['glib-compile-resources',
