diff --git a/test cases/common/93 selfbuilt custom/meson.build b/test cases/common/93 selfbuilt custom/meson.build index fc5d916eb..3cc3906b6 100644 --- a/test cases/common/93 selfbuilt custom/meson.build +++ b/test cases/common/93 selfbuilt custom/meson.build @@ -17,7 +17,7 @@ test('maintest', main) lib = library('libtool', 'tool.cpp') -checkarg = executable('checkarg', 'checkarg.cpp') +checkarg = executable('checkarg', 'checkarg.cpp', native : true) ctlib = custom_target('ctlib', output : 'ctlib.out', @@ -25,3 +25,15 @@ ctlib = custom_target('ctlib', command : [checkarg, lib], build_by_default : true, ) + +if meson.is_cross_build() and meson.has_exe_wrapper() + checkarg_host = executable('checkarg_host', 'checkarg.cpp') + + ctlib_host = custom_target( + 'ctlib_host', + output : 'ctlib.host.out', + capture : true, + command : [checkarg_host, lib], + build_by_default : true, + ) +endif