mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 20:50:41 +08:00
7a5afada19
* [geos] Update to 3.9.0 * update version record
53 lines
1.6 KiB
CMake
53 lines
1.6 KiB
CMake
set(GEOS_VERSION 3.9.0)
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
|
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
|
|
SHA512 1081f2aa20e671450953f7bb53b17c703804a1c9f4987c9da0987ff24339af5811b2c8b79c8e438d04ca38e4d06164dc5a4206f266f7efc19af3f9d9ea8f71f8
|
|
)
|
|
vcpkg_extract_source_archive_ex(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
ARCHIVE ${ARCHIVE}
|
|
REF ${GEOS_VERSION}
|
|
PATCHES
|
|
dont-build-docs.patch
|
|
dont-build-astyle.patch
|
|
)
|
|
|
|
# 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)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
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)
|
|
endif()
|
|
|
|
# Handle copyright
|
|
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright COPYONLY)
|
|
|
|
vcpkg_copy_pdbs()
|