+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 }