1 project('gst-plugins-ugly', 'c',
3 meson_version : '>= 0.35.0',
4 default_options : [ 'warning_level=1',
5 'buildtype=debugoptimized' ])
7 gst_version = meson.project_version()
8 version_arr = gst_version.split('.')
9 gst_version_major = version_arr[0]
10 gst_version_minor = version_arr[1]
11 gst_version_micro = version_arr[2]
12 if version_arr.length() == 4
13 gst_version_nano = version_arr[3]
18 glib_req = '>= 2.40.0'
19 gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
23 plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
25 cc = meson.get_compiler('c')
26 cdata = configuration_data()
28 ['HAVE_DLFCN_H', 'dlfcn.h'],
29 ['HAVE_INTTYPES_H', 'inttypes.h'],
30 ['HAVE_MALLOC_H', 'malloc.h'],
31 ['HAVE_MEMORY_H', 'memory.h'],
32 ['HAVE_STDINT_H', 'stdint.h'],
33 ['HAVE_STDLIB_H', 'stdlib.h'],
34 ['HAVE_STRINGS_H', 'strings.h'],
35 ['HAVE_STRING_H', 'string.h'],
36 ['HAVE_SYS_STAT_H', 'sys/stat.h'],
37 ['HAVE_SYS_TYPES_H', 'sys/types.h'],
38 ['HAVE_UNISTD_H', 'unistd.h'],
39 ['HAVE_WINSOCK2_H', 'winsock2.h'],
42 foreach h : check_headers
43 if cc.has_header(h.get(1))
44 cdata.set(h.get(0), 1)
49 # check token HAVE_CPU_ALPHA
50 # check token HAVE_CPU_ARM
51 # check token HAVE_CPU_CRIS
52 # check token HAVE_CPU_CRISV32
53 # check token HAVE_CPU_HPPA
54 # check token HAVE_CPU_I386
55 # check token HAVE_CPU_IA64
56 # check token HAVE_CPU_M68K
57 # check token HAVE_CPU_MIPS
58 # check token HAVE_CPU_PPC
59 # check token HAVE_CPU_PPC64
60 # check token HAVE_CPU_S390
61 # check token HAVE_CPU_SPARC
62 # check token HAVE_CPU_X86_64
63 ['HAVE_DCGETTEXT', 'dcgettext'],
64 # check token HAVE_EXPERIMENTAL
65 # check token HAVE_EXTERNAL
66 # check token HAVE_GETTEXT
67 # check token HAVE_VALGRIND
70 foreach f : check_functions
71 if cc.has_function(f.get(1))
72 cdata.set(f.get(0), 1)
76 cdata.set('SIZEOF_CHAR', cc.sizeof('char'))
77 cdata.set('SIZEOF_INT', cc.sizeof('int'))
78 cdata.set('SIZEOF_LONG', cc.sizeof('long'))
79 cdata.set('SIZEOF_SHORT', cc.sizeof('short'))
80 cdata.set('SIZEOF_VOIDP', cc.sizeof('void*'))
82 cdata.set('VERSION', '"@0@"'.format(gst_version))
83 cdata.set('PACKAGE', '"gst-plugins-ugly"')
84 cdata.set('GETTEXT_PACKAGE', '"gst-plugins-ugly-1.0"')
85 cdata.set('GST_PACKAGE_NAME', '"GStreamer Ugly Plug-ins"')
86 cdata.set('GST_PACKAGE_ORIGIN', '"Unknown package origin"')
87 cdata.set('GST_LICENSE', '"LGPL"')
90 gst_dep = dependency('gstreamer-1.0', version : gst_req,
91 fallback : ['gstreamer', 'gst_dep'])
92 gstapp_dep = dependency('gstreamer-app-1.0', version : gst_req,
93 fallback : ['gst-plugins-base', 'app_dep'])
94 gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
95 fallback : ['gst-plugins-base', 'video_dep'])
96 gstpbutils_dep = dependency('gstreamer-pbutils-1.0', version : gst_req,
97 fallback : ['gst-plugins-base', 'pbutils_dep'])
98 gsttag_dep = dependency('gstreamer-tag-1.0', version : gst_req,
99 fallback : ['gst-plugins-base', 'tag_dep'])
100 gstfft_dep = dependency('gstreamer-fft-1.0', version : gst_req,
101 fallback : ['gst-plugins-base', 'fft_dep'])
102 gstaudio_dep = dependency('gstreamer-audio-1.0', version : gst_req,
103 fallback : ['gst-plugins-base', 'audio_dep'])
104 gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
105 fallback : ['gstreamer', 'gst_base_dep'])
106 gstriff_dep = dependency('gstreamer-riff-1.0', version : gst_req,
107 fallback : ['gst-plugins-base', 'riff_dep'])
108 gstrtp_dep = dependency('gstreamer-rtp-1.0', version : gst_req,
109 fallback : ['gst-plugins-base', 'rtp_dep'])
110 gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req,
111 fallback : ['gstreamer', 'gst_net_dep'])
112 gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
113 fallback : ['gst-plugins-base', 'sdp_dep'])
114 gstrtsp_dep = dependency('gstreamer-rtsp-1.0', version : gst_req,
115 fallback : ['gst-plugins-base', 'rtsp_dep'])
116 gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
117 fallback : ['gstreamer', 'gst_check_dep'])
118 gstcontroller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
119 fallback : ['gstreamer', 'gst_controller_dep'])
121 orc_dep = dependency('orc-0.4', version : '>= 0.4.16', required : false)
123 cdata.set('HAVE_ORC', 1) # used by a52dec for cpu detection
125 cdata.set('DISABLE_ORC', 1)
128 configure_file(input : 'config.h.meson',
130 configuration : cdata)
132 ugly_args = ['-DHAVE_CONFIG_H']
133 configinc = include_directories('.')
134 libsinc = include_directories('gst-libs')
141 python3 = find_program('python3')
142 run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')