2022-07-15 03:19:03 +08:00
|
|
|
set(GEOS_VERSION 3.11.0)
|
2017-09-27 04:29:24 +08:00
|
|
|
|
2016-10-17 08:22:00 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2021-11-10 02:10:08 +08:00
|
|
|
URLS "https://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
2018-10-16 09:56:14 +08:00
|
|
|
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
|
2022-07-15 03:19:03 +08:00
|
|
|
SHA512 40c7553bbb93673c231ddd0131b73bf43b3f50524bc5bd9e6934c068d2c09632f388b7429254ae15d9641da2d15e3a626b430438854e98d9e7419ad04e535189
|
2016-10-17 08:22:00 +08:00
|
|
|
)
|
2018-10-16 09:56:14 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-05-27 04:29:02 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2022-04-26 08:17:07 +08:00
|
|
|
REF "${GEOS_VERSION}"
|
2020-09-01 08:45:58 +08:00
|
|
|
PATCHES
|
2021-11-10 02:10:08 +08:00
|
|
|
disable-warning-4996.patch
|
|
|
|
fix-exported-config.patch
|
2022-08-16 02:50:40 +08:00
|
|
|
fix_clang-cl.patch
|
2017-10-04 02:37:23 +08:00
|
|
|
)
|
2016-10-17 08:22:00 +08:00
|
|
|
|
2022-04-26 08:17:07 +08:00
|
|
|
vcpkg_list(SET EXTRA_OPTIONS)
|
2020-09-10 03:26:45 +08:00
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
2022-04-26 08:17:07 +08:00
|
|
|
vcpkg_list(APPEND EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON")
|
2020-09-10 03:26:45 +08:00
|
|
|
endif()
|
|
|
|
|
2021-05-27 04:29:02 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-05-01 16:14:18 +08:00
|
|
|
OPTIONS
|
2021-11-10 02:10:08 +08:00
|
|
|
-DBUILD_ASTYLE=OFF
|
|
|
|
-DBUILD_DOCUMENTATION=OFF
|
|
|
|
-DBUILD_GEOSOP=OFF
|
2020-09-01 08:45:58 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2021-05-27 04:29:02 +08:00
|
|
|
-DBUILD_BENCHMARKS=OFF
|
2022-04-26 08:17:07 +08:00
|
|
|
${EXTRA_OPTIONS}
|
2016-10-17 08:22:00 +08:00
|
|
|
)
|
2021-05-27 04:29:02 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/GEOS)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-10-16 09:56:14 +08:00
|
|
|
|
2022-04-26 08:17:07 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config")
|
|
|
|
file(CHMOD "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config" FILE_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
|
|
|
GROUP_READ GROUP_EXECUTE
|
|
|
|
WORLD_READ WORLD_EXECUTE
|
|
|
|
)
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
2021-11-10 02:10:08 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
|
|
|
file(CHMOD "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config" FILE_PERMISSIONS
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
|
|
|
GROUP_READ GROUP_EXECUTE
|
|
|
|
WORLD_READ WORLD_EXECUTE
|
|
|
|
)
|
|
|
|
endif()
|
2018-12-13 20:06:27 +08:00
|
|
|
endif()
|
|
|
|
|
2021-05-27 04:29:02 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2016-11-01 03:34:04 +08:00
|
|
|
endif()
|
|
|
|
|
2017-10-04 20:36:30 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-04-26 08:17:07 +08:00
|
|
|
|
2021-05-27 04:29:02 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2022-04-26 08:17:07 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|