Merge branch 'upstream/1.19.3' into tizen_gst_1.19.3
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-base / gst-libs / gst / allocators / meson.build
index 37ac665..ce73e64 100644 (file)
@@ -1,27 +1,27 @@
-gst_allocators_headers = [
+gst_allocators_headers = files([
   'allocators.h',
   'allocators-prelude.h',
   'gstfdmemory.h',
   'gstphysmemory.h',
   'gstdmabuf.h',
-]
+])
 
 if tbm_dep.found()
-  gst_allocators_headers += [
+  gst_allocators_headers += files([
   'gsttizenmemory.h',
   'gsttizenbufferpool.h',
-  ]
+  ])
 endif
 install_headers(gst_allocators_headers, subdir : 'gstreamer-1.0/gst/allocators/')
 
-gst_allocators_sources = [ 'gstdmabuf.c', 'gstfdmemory.c', 'gstphysmemory.c']
+gst_allocators_sources = files([ 'gstdmabuf.c', 'gstfdmemory.c', 'gstphysmemory.c'])
 if tbm_dep.found()
-  gst_allocators_sources += ['gsttizenmemory.c', 'gsttizenbufferpool.c']
+  gst_allocators_sources += files(['gsttizenmemory.c', 'gsttizenbufferpool.c'])
 endif
 
 gstallocators = library('gstallocators-@0@'.format(api_version),
   gst_allocators_sources,
-  c_args : gst_plugins_base_args + ['-DBUILDING_GST_ALLOCATORS'],
+  c_args : gst_plugins_base_args + ['-DBUILDING_GST_ALLOCATORS', '-DG_LOG_DOMAIN="GStreamer-Allocators"'],
   include_directories: [configinc, libsinc],
   version : libversion,
   soversion : soversion,
@@ -30,31 +30,38 @@ gstallocators = library('gstallocators-@0@'.format(api_version),
   dependencies : [gst_dep, video_dep, tbm_dep],
 )
 
+pkg_name = 'gstreamer-allocators-1.0'
 pkgconfig.generate(gstallocators,
   libraries : [gst_dep],
   variables : pkgconfig_variables,
   subdirs : pkgconfig_subdirs,
-  name : 'gstreamer-allocators-1.0',
+  name : pkg_name,
   description : 'Allocators implementation',
 )
 
+library_def = {'lib': gstallocators}
 allocators_gen_sources  = []
 if build_gir
   gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ]
-  allocators_gir = gnome.generate_gir(gstallocators,
-    sources : gst_allocators_sources + gst_allocators_headers,
-    namespace : 'GstAllocators',
-    nsversion : api_version,
-    identifier_prefix : 'Gst',
-    symbol_prefix : 'gst',
-    export_packages : 'gstreamer-allocators-1.0',
-    includes : ['Gst-1.0'],
-    install : true,
-    extra_args : gst_gir_extra_args,
-    dependencies : [gst_dep]
-  )
-  allocators_gen_sources += allocators_gir
+  gir = {
+    'sources' : gst_allocators_sources + gst_allocators_headers,
+    'namespace' : 'GstAllocators',
+    'nsversion' : api_version,
+    'identifier_prefix' : 'Gst',
+    'symbol_prefix' : 'gst',
+    'export_packages' : pkg_name,
+    'includes' : ['Gst-1.0'],
+    'install' : true,
+    'extra_args' : gst_gir_extra_args,
+    'dependencies' : [gst_dep]
+  }
+  library_def += {'gir': [gir]}
+  if not static_build
+    allocators_gir = gnome.generate_gir(gstallocators, kwargs: gir)
+    allocators_gen_sources += allocators_gir
+  endif
 endif
+libraries += [[pkg_name, library_def]]
 
 allocators_dep = declare_dependency(link_with: gstallocators,
   include_directories : [libsinc],