diff options
Diffstat (limited to 'Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh')
-rwxr-xr-x | Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh new file mode 100755 index 0000000..e62bb74 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# This is a replacement for pkg-config that compares the string passed +# to the --exists argument with the PKG_CONFIG_PATH environment variable +# and returns 1 if they are different. + +case $1 in + --version) + echo "0.0-cmake-dummy" + ;; + --exists) + shift + echo "$@" + echo "${PKG_CONFIG_PATH}" + [ "$@" = "${PKG_CONFIG_PATH}" ] || exit 1 + ;; + *) + exit 255 + ;; +esac |