Add build options of backends
[platform/core/uifw/libds-tizen.git] / src / libds / meson.build
index e7f2970..ed8c95f 100644 (file)
@@ -2,9 +2,7 @@ libds_files = [
   'log.c',
   'addon.c',
   'buffer.c',
-  'allocator/allocator.c',
-  'allocator/shm.c',
-  'allocator/tbm.c',
+  'allocator.c',
   'swapchain.c',
   'output.c',
   'compositor.c',
@@ -52,7 +50,6 @@ math = meson.get_compiler('c').find_library('m')
 wayland_server = dependency('wayland-server', required: true)
 pixman = dependency('pixman-1', required: true)
 libdrm = dependency('libdrm', required: true)
-libtbm = dependency('libtbm', required: true)
 
 libds_deps = [
   math,
@@ -62,6 +59,7 @@ libds_deps = [
 ]
 
 subdir('backend')
+subdir('allocator')
 
 lib_libds = shared_library('ds', libds_files,
   dependencies: libds_deps,
@@ -70,8 +68,23 @@ lib_libds = shared_library('ds', libds_files,
   install: true
 )
 
+ds_vars = {}
+foreach name, have : features
+  ds_vars += { 'have_' + name.underscorify(): have.to_string() }
+endforeach
+
 dep_libds = declare_dependency(
   link_with: lib_libds,
   dependencies: libds_deps,
   include_directories: [ common_inc, include_directories('.') ],
+  variables: ds_vars,
+)
+
+pkgconfig = import('pkgconfig')
+pkgconfig.generate(lib_libds,
+  version: meson.project_version(),
+  filebase: meson.project_name(),
+  name: meson.project_name(),
+  description: 'Wayland compositor library',
+  variables: ds_vars,
 )