aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbialasjaroslaw <bialas.jaroslaw@gmail.com>2020-09-09 21:26:45 +0200
committerGitHub <noreply@github.com>2020-09-09 12:26:45 -0700
commit8fdd0b721721753f439bba793c8c2128b028b8e3 (patch)
treef89469f8c53da8a95eb7b92c3c4d4603571c9052
parentdb465c6895f75eea10609feeb82699e691e01899 (diff)
downloadvcpkg-8fdd0b721721753f439bba793c8c2128b028b8e3.tar.gz
vcpkg-8fdd0b721721753f439bba793c8c2128b028b8e3.zip
[geos] Fix linking of geos for mingw (#13393)
* Fix linking of geos for mingw Linking stage is failing due to the multiple definitions of the same symbol. One way of fixing this is to disable inlining for small functions by passing DISABLE_GEOS_INLINE=ON for mingw builds. * Bump the port version. * [geos] Bump version Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
-rw-r--r--ports/geos/CONTROL1
-rw-r--r--ports/geos/portfile.cmake7
2 files changed, 8 insertions, 0 deletions
diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL
index c5d99f6f6..1de3669c9 100644
--- a/ports/geos/CONTROL
+++ b/ports/geos/CONTROL
@@ -1,4 +1,5 @@
Source: geos
Version: 3.8.1
+Port-Version: 1
Homepage: https://www.osgeo.org/projects/geos/
Description: Geometry Engine Open Source
diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake
index d6b4e0830..1ab40425f 100644
--- a/ports/geos/portfile.cmake
+++ b/ports/geos/portfile.cmake
@@ -17,12 +17,19 @@ vcpkg_extract_source_archive_ex(
# NOTE: GEOS provides CMake as optional build configuration, it might not be actively
# maintained, so CMake build issues may happen between releases.
+if(VCPKG_TARGET_IS_MINGW)
+ set(_CMAKE_EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON")
+else()
+ set(_CMAKE_EXTRA_OPTIONS "")
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_DEBUG_POSTFIX=d
-DBUILD_TESTING=OFF
+ ${_CMAKE_EXTRA_OPTIONS}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GEOS)