vcpkg/ports/shapelib/portfile.cmake

75 lines
1.9 KiB
CMake
Raw Normal View History

2017-09-23 15:08:38 +08:00
vcpkg_download_distfile(ARCHIVE
2023-12-28 16:06:40 +08:00
URLS "http://download.osgeo.org/shapelib/shapelib-${VERSION}.zip"
FILENAME "shapelib-${VERSION}.zip"
SHA512 f3f43f2028fe442e020558de2559b24eae9c7a1d0c84cc242f23ea985cf1fb5ff39fbfef7738f9b8ef5df9a5d0b9f3e891a61b3d5fbbe5b224f41a46589723a3
2017-09-23 15:08:38 +08:00
)
vcpkg_extract_source_archive(
SOURCE_PATH
2023-12-28 16:06:40 +08:00
ARCHIVE "${ARCHIVE}"
)
vcpkg_check_features(OUT_FEATURE_OPTIONS options
FEATURES
contrib BUILD_SHAPELIB_CONTRIB
2018-03-25 04:26:48 +08:00
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2018-03-25 04:26:48 +08:00
OPTIONS
2023-12-28 16:06:40 +08:00
${options}
-DBUILD_TESTING=OFF
2018-03-25 04:26:48 +08:00
)
2017-09-23 15:08:38 +08:00
vcpkg_cmake_install()
2023-12-28 16:06:40 +08:00
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2017-09-23 15:08:38 +08:00
2023-12-28 16:06:40 +08:00
vcpkg_copy_tools(
TOOL_NAMES
dbfadd
dbfcreate
dbfdump
shpadd
shpcreate
shpdump
shprewind
shptreedump
AUTO_CLEAN
)
if(BUILD_SHAPELIB_CONTRIB)
vcpkg_copy_tools(
TOOL_NAMES
csv2shp
dbfcat
dbfinfo
Shape_PointInPoly
shpcat
shpcentrd
shpdata
shpdxf
shpfix
shpinfo
shpsort
shpwkb
AUTO_CLEAN
)
2017-09-23 15:08:38 +08:00
endif()
2023-12-28 16:06:40 +08:00
vcpkg_install_copyright(
FILE_LIST "${SOURCE_PATH}/LICENSE-LGPL" "${SOURCE_PATH}/LICENSE-MIT"
# Cf. web/license.html
COMMENT [[
The core portions of the library are made available under two
possible licenses. The licensee can choose to use the code under
either the Library GNU Public License described in LICENSE-LGPL
or under the MIT license described in LICENSE-MIT.
2017-09-23 15:08:38 +08:00
2023-12-28 16:06:40 +08:00
Some auxiliary portions of Shapelib, notably some of the components
in the contrib directory come under slightly different license restrictions.
Check the source files that you are actually using for conditions.
]])