aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/frameworks/20 cups/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/frameworks/20 cups/meson.build')
-rw-r--r--meson/test cases/frameworks/20 cups/meson.build21
1 files changed, 21 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/20 cups/meson.build b/meson/test cases/frameworks/20 cups/meson.build
new file mode 100644
index 000000000..c5339807e
--- /dev/null
+++ b/meson/test cases/frameworks/20 cups/meson.build
@@ -0,0 +1,21 @@
+project('cups test', 'c')
+
+cups_dep = dependency('cups', version : '>=1.4', required: false)
+
+if not cups_dep.found()
+ error('MESON_SKIP_TEST cups not found.')
+endif
+
+e = executable('cups_prog', 'cups_prog.c', dependencies : cups_dep)
+
+test('cupstest', e)
+
+# ensure we can find the cups dependency via the legacy and modern config-tool
+# options
+depCC = dependency('cups', version : '>=1.4', method : 'cups-config')
+depCT = dependency('cups', version : '>=1.4', method : 'config-tool')
+depCM = dependency('cups', version : '>=1.4', method : 'cmake')
+
+# check we can apply a version constraint
+dependency('cups', version: '>=@0@'.format(depCT.version()), method: 'pkg-config', required: false)
+dependency('cups', version: '>=@0@'.format(depCT.version()), method: 'config-tool')