Add build options of backends
[platform/core/uifw/libds-tizen.git] / src / libds / backend / tdm / meson.build
index 9a0b041..82eb165 100644 (file)
@@ -1,8 +1,32 @@
+msg = ['Required for TDM backend support.']
+if 'tdm' in backends
+  msg += 'Install "libtdm" and "libtbm", or disable the tdm backend'
+endif
+
+libtdm = dependency(
+  'libtdm',
+  required: 'tdm' in backends,
+  not_found_message: '\n'.join(msg)
+)
+
+libtbm = dependency(
+  'libtbm',
+  required: 'tdm' in backends,
+  not_found_message: '\n'.join(msg)
+)
+
+if not libtdm.found() or not libtbm.found()
+  subdir_done()
+endif
+
 libds_files += files(
   'backend.c',
   'output.c',
 )
 
 libds_deps += [
-  dependency('libtdm', required: true),
+  libtdm,
+  libtbm
 ]
+
+features += { 'tdm-backend': true }