2020-08-06 03:58:39 +08:00
|
|
|
set(SHAPELIB_VERSION 1.5.0)
|
|
|
|
set(SHAPELIB_HASH 230939afb33aee042808a32b38ee9dfc7ec1f39432e5a4ebe3fda99c2f87bfbebc91830d4e21691c51aae3f4bb65d7e71e7061472bb08124dcd3402c46800d6c)
|
2017-09-23 15:08:38 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip"
|
|
|
|
FILENAME "shapelib-${SHAPELIB_VERSION}.zip"
|
|
|
|
SHA512 ${SHAPELIB_HASH}
|
|
|
|
)
|
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
PATCHES
|
|
|
|
option-build-test.patch
|
2018-03-25 04:26:48 +08:00
|
|
|
)
|
|
|
|
|
2021-11-06 04:02:58 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-03-25 04:26:48 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TEST=OFF
|
|
|
|
)
|
2017-09-23 15:08:38 +08:00
|
|
|
|
2021-11-06 04:02:58 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-09-23 15:08:38 +08:00
|
|
|
|
2021-11-06 04:02:58 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME shp)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-09-23 15:08:38 +08:00
|
|
|
|
|
|
|
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
2018-03-25 04:26:48 +08:00
|
|
|
if(EXES)
|
2021-11-06 04:02:58 +08:00
|
|
|
file(COPY ${EXES} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/shapelib")
|
2018-03-25 04:26:48 +08:00
|
|
|
file(REMOVE ${EXES})
|
|
|
|
endif()
|
2017-09-23 15:08:38 +08:00
|
|
|
|
|
|
|
file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
2018-03-25 04:26:48 +08:00
|
|
|
if(DEBUG_EXES)
|
|
|
|
file(REMOVE ${DEBUG_EXES})
|
|
|
|
endif()
|
2017-09-23 15:08:38 +08:00
|
|
|
|
2018-03-25 04:26:48 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-11-06 04:02:58 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2017-09-23 15:08:38 +08:00
|
|
|
endif()
|
|
|
|
|
2021-11-06 04:02:58 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2017-09-23 15:08:38 +08:00
|
|
|
|
2021-11-06 04:02:58 +08:00
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/shapelib")
|
2017-09-23 15:08:38 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|