From: Antonio Ospite Date: Thu, 3 Nov 2016 12:34:18 +0000 (+0100) Subject: meson: tools: generate the targets dynamically X-Git-Tag: 1.12.0~255 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4eb64cd2764d4624fcc2c6c6067d6b67361a773f;p=platform%2Fupstream%2Fgstreamer.git meson: tools: generate the targets dynamically The three targets are the same except for input and output files, use a loop and generate them dynamically. https://bugzilla.gnome.org/show_bug.cgi?id=773917 --- diff --git a/tools/meson.build b/tools/meson.build index 2882c83..c8d752f 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,23 +1,14 @@ -executable('gst-inspect-1.0', - 'gst-inspect.c', - install: true, - dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep], - link_with: [printf_lib], - c_args: gst_c_args, -) +tools = [ 'gst-inspect', 'gst-launch','gst-typefind' ] -executable('gst-launch-1.0', - 'gst-launch.c', - install: true, - dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep], - link_with: [printf_lib], - c_args: gst_c_args, -) +foreach tool : tools + exe_name = '@0@-@1@'.format(tool, apiversion) + src_file = '@0@.c'.format(tool) -executable('gst-typefind-1.0', - 'gst-typefind.c', - install: true, - dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep], - link_with: [printf_lib], - c_args: gst_c_args, -) + executable(exe_name, + src_file, + install: true, + dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep], + link_with: [printf_lib], + c_args: gst_c_args, + ) +endforeach