mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 16:17:51 +08:00
f62b97c7f5
* [shapelib] Update to 1.5.0 * Update portfile.cmake Co-authored-by: Oskari Timperi <oskari.timperi@novatron.fi> Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com>
50 lines
1.4 KiB
CMake
50 lines
1.4 KiB
CMake
set(SHAPELIB_VERSION 1.5.0)
|
|
set(SHAPELIB_HASH 230939afb33aee042808a32b38ee9dfc7ec1f39432e5a4ebe3fda99c2f87bfbebc91830d4e21691c51aae3f4bb65d7e71e7061472bb08124dcd3402c46800d6c)
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip"
|
|
FILENAME "shapelib-${SHAPELIB_VERSION}.zip"
|
|
SHA512 ${SHAPELIB_HASH}
|
|
)
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
ARCHIVE ${ARCHIVE}
|
|
PATCHES
|
|
option-build-test.patch
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DBUILD_TEST=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
|
if(EXES)
|
|
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib)
|
|
file(REMOVE ${EXES})
|
|
endif()
|
|
|
|
file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
|
if(DEBUG_EXES)
|
|
file(REMOVE ${DEBUG_EXES})
|
|
endif()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
endif()
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib)
|
|
|
|
vcpkg_copy_pdbs()
|