aboutsummaryrefslogtreecommitdiffstats
path: root/pkg-test/test-pkg-config
diff options
context:
space:
mode:
Diffstat (limited to 'pkg-test/test-pkg-config')
-rwxr-xr-xpkg-test/test-pkg-config21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg-test/test-pkg-config b/pkg-test/test-pkg-config
new file mode 100755
index 00000000..c516bed6
--- /dev/null
+++ b/pkg-test/test-pkg-config
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Test that the installed qpdf development packages enable a qpdf
+# application to be build with cmake using qpdf's cmake package
+# information. Requires cmake as well as libqpdf development
+# dependencies.
+#
+set -ex
+
+TMP=$1
+if [ ! -d "$TMP" ]; then
+ echo 1>&2 "Usage: $0 tmp-dir"
+ exit 2
+fi
+
+cp pkg-test/qpdf-version.cc $TMP
+cd $TMP
+g++ qpdf-version.cc -o qpdf-version \
+ $(pkg-config libqpdf --cflags) \
+ $(pkg-config libqpdf --libs)
+./qpdf-version