tests: Enable unit test on Windows
[platform/upstream/gstreamer.git] / meson.build
1 project('gst-plugins-bad', 'c', 'cpp',
2   version : '1.15.0.1',
3   meson_version : '>= 0.47',
4   default_options : [ 'warning_level=1',
5                       'buildtype=debugoptimized' ])
6
7 gst_version = meson.project_version()
8 version_arr = gst_version.split('.')
9 gst_version_major = version_arr[0].to_int()
10 gst_version_minor = version_arr[1].to_int()
11 gst_version_micro = version_arr[2].to_int()
12  if version_arr.length() == 4
13   gst_version_nano = version_arr[3].to_int()
14 else
15   gst_version_nano = 0
16 endif
17 gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
18
19 glib_req = '>= 2.40.0'
20 gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
21
22 api_version = '1.0'
23 soversion = 0
24 # maintaining compatibility with the previous libtool versioning
25 # current = minor * 100 + micro
26 curversion = gst_version_minor * 100 + gst_version_micro
27 libversion = '@0@.@1@.0'.format(soversion, curversion)
28 osxversion = curversion + 1
29
30 plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
31
32 cc = meson.get_compiler('c')
33 cxx = meson.get_compiler('cpp')
34
35 cdata = configuration_data()
36
37 if cc.get_id() == 'msvc'
38   # Ignore several spurious warnings for things gstreamer does very commonly
39   # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
40   # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once
41   # NOTE: Only add warnings here if you are sure they're spurious
42   msvc_args = [
43       '/wd4018', # implicit signed/unsigned conversion
44       '/wd4146', # unary minus on unsigned (beware INT_MIN)
45       '/wd4244', # lossy type conversion (e.g. double -> int)
46       '/wd4305', # truncating type conversion (e.g. double -> float)
47       cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
48   ]
49   add_project_arguments(msvc_args, language : 'c')
50   add_project_arguments(msvc_args, language : 'cpp')
51   # Disable SAFESEH with MSVC for plugins and libs that use external deps that
52   # are built with MinGW
53   noseh_link_args = ['/SAFESEH:NO']
54 else
55   if cxx.has_argument('-Wno-non-virtual-dtor')
56     add_project_arguments('-Wno-non-virtual-dtor', language: 'cpp')
57   endif
58
59   noseh_link_args = []
60 endif
61
62 if cc.has_link_argument('-Wl,-Bsymbolic-functions')
63   add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
64 endif
65
66 # Symbol visibility
67 if cc.get_id() == 'msvc'
68   export_define = '__declspec(dllexport) extern'
69 elif cc.has_argument('-fvisibility=hidden')
70   add_project_arguments('-fvisibility=hidden', language: 'c')
71   export_define = 'extern __attribute__ ((visibility ("default")))'
72 else
73   export_define = 'extern'
74 endif
75
76 # Passing this through the command line would be too messy
77 cdata.set('GST_API_EXPORT', export_define)
78
79 # Disable strict aliasing
80 if cc.has_argument('-fno-strict-aliasing')
81   add_project_arguments('-fno-strict-aliasing', language: 'c')
82 endif
83 if cxx.has_argument('-fno-strict-aliasing')
84   add_project_arguments('-fno-strict-aliasing', language: 'cpp')
85 endif
86
87 # Define G_DISABLE_DEPRECATED for development versions
88 if gst_version_is_dev
89   message('Disabling deprecated GLib API')
90   add_project_arguments('-DG_DISABLE_DEPRECATED', language: 'c')
91 endif
92
93 cast_checks = get_option('gobject-cast-checks')
94 if cast_checks.disabled() or (cast_checks.auto() and not gst_version_is_dev)
95   message('Disabling GLib cast checks')
96   add_project_arguments('-DG_DISABLE_CAST_CHECKS', language: 'c')
97 endif
98
99 glib_asserts = get_option('glib-asserts')
100 if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
101   message('Disabling GLib asserts')
102   add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
103 endif
104
105 glib_checks = get_option('glib-checks')
106 if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
107   message('Disabling GLib checks')
108   add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
109 endif
110
111 check_headers = [
112   ['HAVE_DLFCN_H', 'dlfcn.h'],
113   ['HAVE_FCNTL_H', 'fcntl.h'],
114   ['HAVE_INTTYPES_H', 'inttypes.h'],
115   ['HAVE_MEMORY_H', 'memory.h'],
116   ['HAVE_NETINET_IN_H', 'netinet/in.h'],
117   ['HAVE_NETINET_IP_H', 'netinet/ip.h'],
118   ['HAVE_NETINET_TCP_H', 'netinet/tcp.h'],
119   ['HAVE_PTHREAD_H', 'pthread.h'],
120   ['HAVE_STDINT_H', 'stdint.h'],
121   ['HAVE_STDLIB_H', 'stdlib.h'],
122   ['HAVE_STRINGS_H', 'strings.h'],
123   ['HAVE_STRING_H', 'string.h'],
124   ['HAVE_SYS_PARAM_H', 'sys/param.h'],
125   ['HAVE_SYS_SOCKET_H', 'sys/socket.h'],
126   ['HAVE_SYS_STAT_H', 'sys/stat.h'],
127   ['HAVE_SYS_TIME_H', 'sys/time.h'],
128   ['HAVE_SYS_TYPES_H', 'sys/types.h'],
129   ['HAVE_SYS_UTSNAME_H', 'sys/utsname.h'],
130   ['HAVE_UNISTD_H', 'unistd.h'],
131   ['HAVE_WINDOWS_H', 'windows.h'],
132   ['HAVE_WINSOCK2_H', 'winsock2.h'],
133   ['HAVE_WS2TCPIP_H', 'ws2tcpip.h'],
134 ]
135
136 foreach h : check_headers
137   if cc.has_header(h.get(1))
138     cdata.set(h.get(0), 1)
139   endif
140 endforeach
141
142 check_functions = [
143 # check token HAVE_ANDROID_MEDIA
144 # check token HAVE_APEXSINK
145 # check token HAVE_APPLE_MEDIA
146 # check token HAVE_ASSRENDER
147 # check token HAVE_AVC
148 # check token HAVE_BLUEZ
149 # check token HAVE_BZ2
150 # check token HAVE_CFLOCALECOPYCURRENT
151 # check token HAVE_CFPREFERENCESCOPYAPPVALUE
152 # check token HAVE_CHROMAPRINT
153 # check token HAVE_CPU_ALPHA
154 # check token HAVE_CPU_ARM
155 # check token HAVE_CPU_CRIS
156 # check token HAVE_CPU_CRISV32
157 # check token HAVE_CPU_HPPA
158 # check token HAVE_CPU_I386
159 # check token HAVE_CPU_IA64
160 # check token HAVE_CPU_M68K
161 # check token HAVE_CPU_MIPS
162 # check token HAVE_CPU_PPC
163 # check token HAVE_CPU_PPC64
164 # check token HAVE_CPU_S390
165 # check token HAVE_CPU_SPARC
166 # check token HAVE_CPU_X86_64
167 # check token HAVE_CURL
168 # check token HAVE_DAALA
169 # check token HAVE_DASH
170 # check token HAVE_DC1394
171   ['HAVE_DCGETTEXT', 'dcgettext'],
172 # check token HAVE_DECKLINK
173 # check token HAVE_DIRECT3D
174 # check token HAVE_DIRECTDRAW
175 # check token HAVE_DIRECTFB
176 # check token HAVE_DIRECTSOUND
177 # check token HAVE_DOWHILE_MACROS
178 # check token HAVE_DTS
179 # check token HAVE_DVB
180 # check token HAVE_EXPERIMENTAL
181 # check token HAVE_EXTERNAL
182 # check token HAVE_FAAC
183 # check token HAVE_FAAD
184 # check token HAVE_FBDEV
185 # check token HAVE_FLITE
186 # check token HAVE_FLUIDSYNTH
187   ['HAVE_GETPAGESIZE', 'getpagesize'],
188 # check token HAVE_GETTEXT
189 # check token HAVE_GL
190 # check token HAVE_GLCHAR
191 # check token HAVE_GLEGLIMAGEOES
192 # check token HAVE_GLINTPTR
193 # check token HAVE_GLSIZEIPTR
194 # check token HAVE_GME
195   ['HAVE_GMTIME_R', 'gmtime_r'],
196 # check token HAVE_GRAPHENE
197 # check token HAVE_GSETTINGS
198 # check token HAVE_GSM
199 # check token HAVE_GUDEV
200 # check token HAVE_HLS
201 # check token HAVE_ICONV
202 # check token HAVE_JPEG
203 # check token HAVE_KATE
204 # check token HAVE_LADSPA
205 # check token HAVE_LIBGCRYPT
206 # check token HAVE_LIBGME_ACCURACY
207 # check token HAVE_LIBMMS
208 # check token HAVE_LIBNSL
209 # check token HAVE_LIBSOCKET
210 # check token HAVE_LIBUSB
211 # check token HAVE_LIBVISUAL
212 # check token HAVE_LINSYS
213 # check token HAVE_LRDF
214 # check token HAVE_LV2
215 # check token HAVE_MIMIC
216   ['HAVE_MMAP', 'mmap'],
217 # check token HAVE_MODPLUG
218 # check token HAVE_MPEG2ENC
219 # check token HAVE_MPG123
220 # check token HAVE_MPLEX
221 # check token HAVE_MUSEPACK
222 # check token HAVE_MYTHTV
223 # check token HAVE_NAS
224 # check token HAVE_NEON
225 # check token HAVE_NETTLE
226 # check token HAVE_OFA
227 # check token HAVE_OPENAL
228 # check token HAVE_OPENCV
229 # check token HAVE_OPENEXR
230 # check token HAVE_OPENJPEG
231 # check token HAVE_OPENJPEG_1
232 # check token HAVE_OPENNI2
233 # check token HAVE_OPENSLES
234 # check token HAVE_OPUS
235 # check token HAVE_ORC
236 # check token HAVE_OSX_VIDEO
237   ['HAVE_PIPE2', 'pipe2'],
238 # check token HAVE_PNG
239 # check token HAVE_PVR
240 # check token HAVE_QUICKTIME
241 # check token HAVE_RDTSC
242 # check token HAVE_RESINDVD
243 # check token HAVE_RSVG
244 # check token HAVE_RSVG_2_36_2
245 # check token HAVE_RTMP
246 # check token HAVE_SBC
247 # check token HAVE_SDL
248 # check token HAVE_SHM
249 # check token HAVE_SMOOTHSTREAMING
250 # check token HAVE_SNDFILE
251 # check token HAVE_SNDIO
252 # check token HAVE_SOUNDTOUCH
253 # check token HAVE_SOUNDTOUCH_1_4
254 # check token HAVE_SPANDSP
255 # check token HAVE_SPC
256 # check token HAVE_SRTP
257 # check token HAVE_SSH2
258 # check token HAVE_TELETEXTDEC
259 # check token HAVE_TIGER
260 # check token HAVE_TIMIDITY
261 # check token HAVE_UVCH264
262 # check token HAVE_VALGRIND
263 # check token HAVE_VCD
264 # check token HAVE_VDPAU
265 # check token HAVE_VIDEOTOOLBOX
266 # check token HAVE_VOAACENC
267 # check token HAVE_VOAMRWBENC
268 # check token HAVE_WASAPI
269 # check token HAVE_WAYLAND
270 # check token HAVE_WEBP
271 # check token HAVE_WILDMIDI
272 # check token HAVE_WIN32
273 # check token HAVE_WININET
274 # check token HAVE_WINKS
275 # check token HAVE_WINSCREENCAP
276 # check token HAVE_XVID
277 # check token HAVE_ZBAR
278 ]
279
280 foreach f : check_functions
281   if cc.has_function(f.get(1))
282     cdata.set(f.get(0), 1)
283   endif
284 endforeach
285
286 cdata.set('SIZEOF_CHAR', cc.sizeof('char'))
287 cdata.set('SIZEOF_INT', cc.sizeof('int'))
288 cdata.set('SIZEOF_LONG', cc.sizeof('long'))
289 cdata.set('SIZEOF_SHORT', cc.sizeof('short'))
290 cdata.set('SIZEOF_VOIDP', cc.sizeof('void*'))
291
292 cdata.set_quoted('VERSION', gst_version)
293 cdata.set_quoted('PACKAGE', 'gst-plugins-bad')
294 cdata.set_quoted('PACKAGE_VERSION', gst_version)
295 cdata.set_quoted('PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer')
296 cdata.set_quoted('PACKAGE_NAME', 'GStreamer Bad Plug-ins')
297 cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-bad-1.0')
298 cdata.set_quoted('GST_API_VERSION', api_version)
299 cdata.set_quoted('GST_LICENSE', 'LGPL')
300 cdata.set_quoted('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
301 cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
302
303 warning_flags = [
304   '-Wmissing-declarations',
305   '-Wredundant-decls',
306   '-Wwrite-strings',
307   '-Wformat',
308   '-Wformat-security',
309   '-Winit-self',
310   '-Wmissing-include-dirs',
311   '-Waddress',
312   '-Wno-multichar',
313   '-Wvla',
314   '-Wpointer-arith',
315 ]
316
317 warning_c_flags = [
318   '-Wmissing-prototypes',
319   '-Wdeclaration-after-statement',
320   '-Wold-style-definition',
321   '-Wnested-externs',
322 ]
323
324 warning_cxx_flags = [
325   '-Wformat-nonliteral',
326 ]
327
328 foreach extra_arg : warning_c_flags
329   if cc.has_argument (extra_arg)
330     add_project_arguments([extra_arg], language: 'c')
331   endif
332 endforeach
333
334 foreach extra_arg : warning_cxx_flags
335   if cxx.has_argument (extra_arg)
336     add_project_arguments([extra_arg], language: 'cpp')
337   endif
338 endforeach
339
340 foreach extra_arg : warning_flags
341   if cc.has_argument (extra_arg)
342     add_project_arguments([extra_arg], language: 'c')
343   endif
344   if cxx.has_argument (extra_arg)
345     add_project_arguments([extra_arg], language: 'cpp')
346   endif
347 endforeach
348
349 # GStreamer package name and origin url
350 gst_package_name = get_option('package-name')
351 if gst_package_name == ''
352   if gst_version_nano == 0
353     gst_package_name = 'GStreamer Bad Plug-ins source release'
354   elif gst_version_nano == 1
355     gst_package_name = 'GStreamer Bad Plug-ins git'
356   else
357     gst_package_name = 'GStreamer Bad Plug-ins prerelease'
358   endif
359 endif
360 cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name)
361 cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))
362
363 # FIXME: This should be exposed as a configuration option
364 host_system = host_machine.system()
365 if host_system == 'linux'
366   cdata.set_quoted('DEFAULT_VIDEOSRC', 'v4l2src')
367 elif ['darwin', 'ios'].contains(host_system)
368   cdata.set_quoted('DEFAULT_VIDEOSRC', 'avfvideosrc')
369   cdata.set_quoted('GST_EXTRA_MODULE_SUFFIX', '.dylib')
370   # Yes, we set this for iOS too. Same as Autotools.
371   cdata.set('HAVE_OSX', 1)
372 else
373   cdata.set_quoted('DEFAULT_VIDEOSRC', 'videotestsrc')
374 endif
375
376 # Mandatory GST deps
377 gst_dep = dependency('gstreamer-1.0', version : gst_req,
378   fallback : ['gstreamer', 'gst_dep'])
379 gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
380   fallback : ['gstreamer', 'gst_base_dep'])
381 gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req,
382   fallback : ['gstreamer', 'gst_net_dep'])
383 gstcontroller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
384   fallback : ['gstreamer', 'gst_controller_dep'])
385
386 gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req,
387     fallback : ['gst-plugins-base', 'pbutils_dep'])
388 gstallocators_dep = dependency('gstreamer-allocators-1.0', version : gst_req,
389     fallback : ['gst-plugins-base', 'allocators_dep'])
390 gstapp_dep = dependency('gstreamer-app-1.0', version : gst_req,
391     fallback : ['gst-plugins-base', 'app_dep'])
392 gstaudio_dep = dependency('gstreamer-audio-1.0', version : gst_req,
393     fallback : ['gst-plugins-base', 'audio_dep'])
394 gstfft_dep = dependency('gstreamer-fft-1.0', version : gst_req,
395     fallback : ['gst-plugins-base', 'fft_dep'])
396 gstriff_dep = dependency('gstreamer-riff-1.0', version : gst_req,
397     fallback : ['gst-plugins-base', 'riff_dep'])
398 gstrtp_dep = dependency('gstreamer-rtp-1.0', version : gst_req,
399     fallback : ['gst-plugins-base', 'rtp_dep'])
400 gstrtsp_dep = dependency('gstreamer-rtsp-1.0', version : gst_req,
401     fallback : ['gst-plugins-base', 'rtsp_dep'])
402 gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
403     fallback : ['gst-plugins-base', 'sdp_dep'])
404 gsttag_dep = dependency('gstreamer-tag-1.0', version : gst_req,
405     fallback : ['gst-plugins-base', 'tag_dep'])
406 gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
407     fallback : ['gst-plugins-base', 'video_dep'])
408 gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
409     required : get_option('tests'),
410     fallback : ['gstreamer', 'gst_check_dep'])
411
412 # GStreamer OpenGL
413 gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
414     fallback : ['gst-plugins-base', 'gstgl_dep'], required: get_option('gl'))
415
416 if gstgl_dep.found()
417   if gstgl_dep.type_name() == 'pkgconfig'
418     gst_gl_apis = gstgl_dep.get_pkgconfig_variable('gl_apis').split()
419     gst_gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split()
420     gst_gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split()
421   else
422     gstbase = subproject('gst-plugins-base')
423     gst_gl_apis = gstbase.get_variable('enabled_gl_apis')
424     gst_gl_winsys = gstbase.get_variable('enabled_gl_winsys')
425     gst_gl_platforms = gstbase.get_variable('enabled_gl_platforms')
426   endif
427
428   message('GStreamer OpenGL window systems: @0@'.format(' '.join(gst_gl_winsys)))
429   message('GStreamer OpenGL platforms: @0@'.format(' '.join(gst_gl_platforms)))
430   message('GStreamer OpenGL apis: @0@'.format(' '.join(gst_gl_apis)))
431
432   foreach ws : ['x11', 'wayland', 'android', 'cocoa', 'eagl', 'win32', 'dispmanx', 'viv_fb']
433     set_variable('gst_gl_have_window_@0@'.format(ws), gst_gl_winsys.contains(ws))
434   endforeach
435
436   foreach p : ['glx', 'egl', 'cgl', 'eagl', 'wgl']
437     set_variable('gst_gl_have_platform_@0@'.format(p), gst_gl_platforms.contains(p))
438   endforeach
439
440   foreach api : ['opengl', 'gles2']
441     set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
442   endforeach
443 endif
444
445 libm = cc.find_library('m', required : false)
446 glib_dep = dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep'])
447 gmodule_dep = dependency('gmodule-2.0', fallback: ['glib', 'libgmodule_dep'])
448 gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
449 # gio-unix-2.0 is used by sys/bluez
450
451 # Optional dep of ext/gl and gst/librfb
452 x11_dep = dependency('x11', required : get_option('x11'))
453 if x11_dep.found()
454   cdata.set('HAVE_X11', 1)
455 endif
456
457 if host_machine.system() == 'windows'
458   winsock2 = [cc.find_library('ws2_32')]
459 else
460   winsock2 = []
461 endif
462
463 if ['darwin', 'ios'].contains(host_system)
464   add_languages('objc')
465   if host_system == 'ios'
466     cdata.set('HAVE_IOS', 1)
467   endif
468
469   avfoundation_dep = dependency('AVFoundation', required : false)
470   if avfoundation_dep.found()
471       cdata.set('HAVE_AVFOUNDATION', 1)
472   endif
473
474   videotoolbox_dep = dependency('VideoToolbox', required : false)
475   if videotoolbox_dep.found()
476       cdata.set('HAVE_VIDEOTOOLBOX', 1)
477   endif
478
479 #  FIXME: framework.version() returns 'unknown'
480 #  if videotoolbox_dep.version().version_compare('>=10.9.6')
481 #    cdata.set('HAVE_VIDEOTOOLBOX_10_9_6', 1)
482 #  endif
483 endif
484
485 have_orcc = false
486 orcc_args = []
487 # Used by various libraries/elements that use Orc code
488 orc_dep = dependency('orc-0.4', required : get_option('orc'))
489 orcc = find_program('orcc', required : get_option('orc'))
490 if orc_dep.found() and orcc.found()
491   have_orcc = true
492   orcc_args = [orcc, '--include', 'glib.h']
493   cdata.set('HAVE_ORC', 1)
494 else
495   message('Orc Compiler not found or disabled, will use backup C code')
496   cdata.set('DISABLE_ORC', 1)
497 endif
498
499 gnustl_dep = declare_dependency()
500 if host_system == 'android'
501   gnustl_dep = dependency('gnustl', required : false)
502 endif
503
504 if gst_dep.type_name() == 'internal'
505   gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
506 else
507   # We can't check that in the case of subprojects as we won't
508   # be able to build against an internal dependency (which is not built yet)
509   gst_debug_disabled = cc.has_header_symbol('gst/gstconfig.h', 'GST_DISABLE_GST_DEBUG', dependencies: gst_dep)
510 endif
511
512 if gst_debug_disabled and cc.has_argument('-Wno-unused')
513   add_project_arguments('-Wno-unused', language: 'c')
514 endif
515
516 gst_plugins_bad_args = ['-DHAVE_CONFIG_H']
517 configinc = include_directories('.')
518 libsinc = include_directories('gst-libs')
519
520 python3 = import('python').find_installation()
521
522 gir = find_program('g-ir-scanner', required : get_option('introspection'))
523 gnome = import('gnome')
524 build_gir = gir.found() and not meson.is_cross_build()
525 gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
526     'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
527     'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
528     'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
529     'gst_init(NULL,NULL);' ]
530
531 presetdir = join_paths(get_option('datadir'), 'gstreamer-' + api_version, 'presets')
532
533 pkgconfig = import('pkgconfig')
534 plugins_pkgconfig_install_dir = join_paths(plugins_install_dir, 'pkgconfig')
535 if get_option('default_library') == 'shared'
536   # If we don't build static plugins there is no need to generate pc files
537   plugins_pkgconfig_install_dir = disabler()
538 endif
539
540 subdir('gst-libs')
541 subdir('gst')
542 subdir('sys')
543 subdir('ext')
544 subdir('tests')
545 subdir('pkgconfig')
546
547 # xgettext is optional (on Windows for instance)
548 if find_program('xgettext', required : get_option('nls')).found()
549   cdata.set('ENABLE_NLS', 1)
550   subdir('po')
551 endif
552
553 configure_file(output : 'config.h', configuration : cdata)
554
555 run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')