[geos-commits] [SCM] GEOS branch main updated. 655aacfea244e9ab0c57d96312522a4b5ac636af
git at osgeo.org
git at osgeo.org
Mon Oct 18 05:55:59 PDT 2021
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, main has been updated
via 655aacfea244e9ab0c57d96312522a4b5ac636af (commit)
via 3455abb137ea89b5f9184827f72af966c2d0a172 (commit)
from 9915ef54ef2648a6d5e149c8e19f7e0f24be0bb9 (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 655aacfea244e9ab0c57d96312522a4b5ac636af
Merge: 9915ef54e 3455abb13
Author: Sandro Santilli <strk at kbt.io>
Date: Mon Oct 18 05:55:56 2021 -0700
Merge pull request 'pkg-config: add -lgeos -lstdc++ -lm for static build options' (!115) from mwtoews/geos:pc-static into main
Reviewed-on: https://git.osgeo.org/gitea/geos/geos/pulls/115
commit 3455abb137ea89b5f9184827f72af966c2d0a172
Author: Mike Taves <mwtoews at gmail.com>
Date: Mon Oct 18 00:14:27 2021 +1300
pkg-config: add -lgeos -lstdc++ -lm for static build options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56d94946b..20c890702 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -259,6 +259,12 @@ target_compile_options(geos_developer_cxx_flags
set(CMAKE_CXX_FLAGS_COVERAGE "-fprofile-arcs -ftest-coverage")
#-----------------------------------------------------------------------------
+# Extra libraries
+#-----------------------------------------------------------------------------
+include(CheckLibraryExists)
+check_library_exists(m pow "" HAVE_LIBM)
+
+#-----------------------------------------------------------------------------
# Target geos: C++ API library
#-----------------------------------------------------------------------------
add_library(geos "")
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index bca151992..bc0e774b5 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -45,6 +45,11 @@ function(configure_install_geos_pc)
set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
set(VERSION ${GEOS_VERSION})
+ set(EXTRA_LIBS "-lstdc++")
+ if(HAVE_LIBM)
+ list(APPEND EXTRA_LIBS "-lm")
+ endif()
+ list(JOIN EXTRA_LIBS " " EXTRA_LIBS)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.in
diff --git a/tools/geos.pc.in b/tools/geos.pc.in
index df0e07b7f..1cbd5a217 100644
--- a/tools/geos.pc.in
+++ b/tools/geos.pc.in
@@ -9,3 +9,4 @@ Requires:
Version: @VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lgeos_c
+Libs.private: -lgeos @EXTRA_LIBS@
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 6 ++++++
tools/CMakeLists.txt | 5 +++++
tools/geos.pc.in | 1 +
3 files changed, 12 insertions(+)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list