vcpkg/ports/shapelib/portfile.cmake

80 lines
2.0 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"
2024-08-17 17:06:43 +08:00
SHA512 50859bbd1ea8808aa06cd112cc16cc77c1bd29d93129180818a5ea3a753b63de4039f232d1d9f13ebd7d076e427d10036e5f00775e633eb637da511625fa29bb
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
2024-08-17 17:06:43 +08:00
tools BUILD_APPS
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
2024-08-17 17:06:43 +08:00
-DUSE_RPATH=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()
2024-08-17 17:06:43 +08:00
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2017-09-23 15:08:38 +08:00
2024-08-17 17:06:43 +08:00
if(BUILD_APPS)
vcpkg_copy_tools(
TOOL_NAMES
dbfadd
dbfcreate
dbfdump
shpadd
shpcreate
shpdump
shprewind
shptreedump
AUTO_CLEAN
)
endif()
2023-12-28 16:06:40 +08:00
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.
]])