2021-03-10 20:14:36 +01:00
|
|
|
set(GEOS_VERSION 3.9.1)
|
2017-09-26 22:29:24 +02:00
|
|
|
|
2016-10-16 20:22:00 -04:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2018-10-16 03:56:14 +02:00
|
|
|
URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
|
|
|
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
|
2021-03-10 20:14:36 +01:00
|
|
|
SHA512 7ea131685cd110ec5e0cb7c214b52b75397371e75f011e1410b6770b6a48ca492a02337d86a7be35c852ef94604fe9d6f49634c79d4946df611aaa4f5cbaee28
|
2016-10-16 20:22:00 -04:00
|
|
|
)
|
2018-10-16 03:56:14 +02:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${GEOS_VERSION}
|
2020-09-01 03:45:58 +03:00
|
|
|
PATCHES
|
|
|
|
dont-build-docs.patch
|
|
|
|
dont-build-astyle.patch
|
2017-10-03 23:37:23 +05:00
|
|
|
)
|
2016-10-16 20:22:00 -04:00
|
|
|
|
2017-09-26 22:29:24 +02:00
|
|
|
# NOTE: GEOS provides CMake as optional build configuration, it might not be actively
|
|
|
|
# maintained, so CMake build issues may happen between releases.
|
|
|
|
|
2020-09-09 21:26:45 +02:00
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
|
|
set(_CMAKE_EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON")
|
|
|
|
else()
|
|
|
|
set(_CMAKE_EXTRA_OPTIONS "")
|
|
|
|
endif()
|
|
|
|
|
2016-10-16 20:22:00 -04:00
|
|
|
vcpkg_configure_cmake(
|
2016-12-07 15:23:50 -08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-10-16 03:56:14 +02:00
|
|
|
PREFER_NINJA
|
2018-05-01 10:14:18 +02:00
|
|
|
OPTIONS
|
2018-10-16 03:56:14 +02:00
|
|
|
-DCMAKE_DEBUG_POSTFIX=d
|
2020-09-01 03:45:58 +03:00
|
|
|
-DBUILD_TESTING=OFF
|
2020-09-09 21:26:45 +02:00
|
|
|
${_CMAKE_EXTRA_OPTIONS}
|
2016-10-16 20:22:00 -04:00
|
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
2020-09-01 03:45:58 +03:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GEOS)
|
2018-10-16 03:56:14 +02:00
|
|
|
|
2018-12-13 13:06:27 +01:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
|
|
|
|
2016-10-16 20:22:00 -04:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2018-10-16 03:56:14 +02:00
|
|
|
if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/geos-config)
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/geos)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/geos-config ${CURRENT_PACKAGES_DIR}/share/geos/geos-config)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/geos-config)
|
2016-10-31 12:34:04 -07:00
|
|
|
endif()
|
|
|
|
|
2018-10-16 03:56:14 +02:00
|
|
|
# Handle copyright
|
|
|
|
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright COPYONLY)
|
|
|
|
|
2017-10-04 05:36:30 -07:00
|
|
|
vcpkg_copy_pdbs()
|