-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[geos] Relocatable geos-config; dynamic builds on Unix (#17616)
* Provide geos-config, and fix dynamic builds on Unix * x-add-version * Fix debug suffix handling * Update git-tree * Don't build benchmarks * Revise pc file and geos-config handling Fixup pc files. Add -lgeos to Libs.private to satisfy common usage requirement (already present in geos-config). Install executable geos-config into tools. Rewrite geos-config relocatability as patch. * Port to non-deprecated cmake functions * Add usage * Update git-tree
- Loading branch information
Showing
8 changed files
with
92 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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() | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake | ||
index 0a9df7fb..53f43d90 100644 | ||
--- a/tools/geos.pc.cmake | ||
+++ b/tools/geos.pc.cmake | ||
@@ -9,3 +9,4 @@ Requires: | ||
Version: @GEOS_VERSION@ | ||
Cflags: -I${includedir} | ||
Libs: -L${libdir} -lgeos_c | ||
+Libs.private: -lgeos | ||
-- | ||
2.17.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
The package geos provides CMake targets: | ||
|
||
# C API (provides long-term ABI stability) | ||
find_package(GEOS CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE GEOS::geos_c) | ||
|
||
# C++ API (will likely change across versions) | ||
find_package(GEOS CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE GEOS::geos) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "geos", | ||
"version": "3.9.1", | ||
"port-version": 1, | ||
"description": "Geometry Engine Open Source", | ||
"homepage": "https://www.osgeo.org/projects/geos/", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters