[geos-commits] [SCM] GEOS branch master updated. 1502648acea4405b1923d23be70d33bdf115cd63

git at osgeo.org git at osgeo.org
Fri Nov 27 12:59:29 PST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  1502648acea4405b1923d23be70d33bdf115cd63 (commit)
       via  a555d027627e9729f830d7273d9a1d9d6cf92cf9 (commit)
      from  656712ec6fbf20006fd5eca06a0604bd57cef768 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1502648acea4405b1923d23be70d33bdf115cd63
Merge: 656712e a555d02
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Nov 27 12:59:19 2020 -0800

    Merge branch 'mwtoews-pkg-config'


commit a555d027627e9729f830d7273d9a1d9d6cf92cf9
Author: Mike Taves <mwtoews at gmail.com>
Date:   Sat Nov 28 09:13:13 2020 +1300

    Feature: add support for pkg-config for GEOS C API (only)
    
    Closes #1073

diff --git a/.gitignore b/.gitignore
index bdb9610..204caf4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,7 @@ tests/unit/geos_unit
 tests/xmltester/SimpleWKTTester
 tests/xmltester/XMLTester
 tests/xmltester/testrunner
+tools/geos.pc
 tools/geos-config
 tools/astyle/astyle
 tests/bigtest/TestSweepLineSpeed
diff --git a/Makefile.am b/Makefile.am
index f064d45..83a06f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,9 @@ EXTRA_DIST = \
 	cmake/geos-config.cmake \
 	cmake/FindMakeDistCheck.cmake
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = tools/geos.pc
+
 ACLOCAL_AMFLAGS = -I macros
 
 dist-hook: gen-ChangeLog
diff --git a/NEWS b/NEWS
index 01de82a..2ac036f 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Changes in 3.9.0
   - CAPI: GEOSPreparedDistance (#1066, Sandro Santilli)
   - SimpleSTRTree spatial index implementation (Paul Ramsey)
   - SimpleSTRTree used for C API (Paul Ramsey)
+  - Add support for pkg-config for GEOS C API (#1073, Mike Taves)
 
 - Improvements:
   - Stack allocate segments in OverlapUnion (Paul Ramsey)
diff --git a/configure.ac b/configure.ac
index 9b64ba3..9e0b0ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -385,6 +385,9 @@ AC_SUBST(CAPI_INTERFACE_CURRENT)
 AC_SUBST(CAPI_INTERFACE_REVISION)
 AC_SUBST(CAPI_INTERFACE_AGE)
 
+dnl pkg-config file -------------------------------------------------------
+AC_CONFIG_FILES([tools/geos.pc])
+
 dnl output stuff ----------------------------------------------------------
 
 AC_OUTPUT([
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 93d9c77..f0f616e 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -27,6 +27,17 @@ if(NOT MSVC)
       OWNER_READ OWNER_EXECUTE
       GROUP_READ GROUP_EXECUTE
       WORLD_READ WORLD_EXECUTE)
+
+  # pkg-config support
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/geos.pc
+    @ONLY)
+
+  install(FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/geos.pc
+    DESTINATION lib/pkgconfig)
+
 endif()
 
 add_subdirectory(astyle)
diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake
new file mode 100644
index 0000000..0a9df7f
--- /dev/null
+++ b/tools/geos.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@ESCAPED_INSTALL_PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: GEOS
+Description: Geometry Engine, Open Source - C API
+Requires:
+Version: @GEOS_VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lgeos_c
diff --git a/tools/geos.pc.in b/tools/geos.pc.in
new file mode 100644
index 0000000..df0e07b
--- /dev/null
+++ b/tools/geos.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+
+Name: GEOS
+Description: Geometry Engine, Open Source - C API
+Requires:
+Version: @VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lgeos_c

-----------------------------------------------------------------------

Summary of changes:
 .gitignore           |  1 +
 Makefile.am          |  3 +++
 NEWS                 |  1 +
 configure.ac         |  3 +++
 tools/CMakeLists.txt | 11 +++++++++++
 tools/geos.pc.cmake  | 11 +++++++++++
 tools/geos.pc.in     | 11 +++++++++++
 7 files changed, 41 insertions(+)
 create mode 100644 tools/geos.pc.cmake
 create mode 100644 tools/geos.pc.in


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list