vcpkg/ports/geos/make-geos-config-relocatable.patch

17 lines
403 B
Diff
Raw Normal View History

diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake
index 6730e215..4c546b5c 100644
--- a/tools/geos-config.cmake
+++ b/tools/geos-config.cmake
@@ -1,7 +1,9 @@
#!/bin/sh
-prefix=@ESCAPED_INSTALL_PREFIX@
-libdir=${prefix}/lib
+DIRNAME=$(dirname $0)
+TOOLS=$(dirname $DIRNAME)
+prefix=$(CDPATH= cd -- "${DIRNAME%/tools/geos/*}" && pwd -P)
+libdir=${prefix}${TOOLS##*/geos}/lib
usage()
{