meson: Apply ASLR on Executable
[platform/upstream/gstreamer.git] / subprojects / gstreamer / tools / meson.build
1 tools = ['gst-inspect', 'gst-stats', 'gst-typefind']
2
3 extra_launch_dep = []
4 extra_launch_arg = []
5
6 if gst_parse
7   if host_system == 'windows' and not building_for_uwp
8     winmm_lib = cc.find_library('winmm', required: false)
9     if winmm_lib.found() and cc.has_header('timeapi.h')
10       extra_launch_dep += [winmm_lib]
11       extra_launch_arg += ['-DHAVE_WINMM']
12     endif
13   endif
14
15   tools += ['gst-launch']
16 endif
17
18 foreach tool : tools
19   exe_name = '@0@-@1@'.format(tool, apiversion)
20   src_file = '@0@.c'.format(tool)
21   extra_deps = []
22   extra_c_args = []
23
24   if tool == 'gst-launch'
25     extra_deps += extra_launch_dep
26     extra_c_args += extra_launch_arg
27   endif
28
29   executable(exe_name,
30     src_file,
31     pie : true,
32     install: true,
33     include_directories : [configinc],
34     dependencies : [glib_dep, gobject_dep, gmodule_dep, mathlib, gst_dep] + extra_deps,
35     c_args: gst_c_args + extra_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)],
36   )
37
38   man_page = '@0@-1.0.1'.format(tool)
39   install_man(man_page)
40 endforeach