[vtk] fix usage and add the usage file (#20356)

* [vtk] fix usage and add the usage file

* version stuff

* typo

* version

* Change qt5-base as a host port

* version

* Revert 433fe47901, push in wrong branch

* Replace deprecate functions

* version
This commit is contained in:
Jack·Boos·Yu 2021-09-28 11:57:22 +08:00 committed by GitHub
parent 1ea790bb36
commit 878d3514eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 6 deletions

View File

@ -164,9 +164,8 @@ file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake
# Configure & Install # Configure & Install
# We set all libraries to "system" and explicitly list the ones that should use embedded copies # We set all libraries to "system" and explicitly list the ones that should use embedded copies
vcpkg_configure_cmake( vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS} OPTIONS ${FEATURE_OPTIONS}
-DBUILD_TESTING=OFF -DBUILD_TESTING=OFF
-DVTK_BUILD_TESTING=OFF -DVTK_BUILD_TESTING=OFF
@ -185,12 +184,12 @@ vcpkg_configure_cmake(
${ADDITIONAL_OPTIONS} ${ADDITIONAL_OPTIONS}
) )
vcpkg_install_cmake() vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
# ============================================================================= # =============================================================================
# Fixup target files # Fixup target files
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtk-9.0) vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/vtk-9.0)
# ============================================================================= # =============================================================================
# Clean-up other directories # Clean-up other directories
@ -306,6 +305,13 @@ else()
endif() endif()
endforeach() endforeach()
# Use vcpkg provided find method
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/${PORT}/FindEXPAT.cmake")
file(RENAME "${CURRENT_PACKAGES_DIR}/share/licenses" "${CURRENT_PACKAGES_DIR}/share/${PORT}/licenses")
# ============================================================================= # =============================================================================
# Usage
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
# Handle copyright # Handle copyright
file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")

5
ports/vtk/usage Normal file
View File

@ -0,0 +1,5 @@
The package vtk provides CMake targets:
find_package(VTK REQUIRED)
include("${VTK_USE_FILE}")
target_link_libraries(main PRIVATE ${VTK_LIBRARIES})

View File

@ -1,7 +1,7 @@
{ {
"name": "vtk", "name": "vtk",
"version-semver": "9.0.3-pv5.9.1", "version-semver": "9.0.3-pv5.9.1",
"port-version": 1, "port-version": 2,
"description": "Software system for 3D computer graphics, image processing, and visualization", "description": "Software system for 3D computer graphics, image processing, and visualization",
"homepage": "https://github.com/Kitware/VTK", "homepage": "https://github.com/Kitware/VTK",
"dependencies": [ "dependencies": [
@ -35,6 +35,14 @@
"sqlite3", "sqlite3",
"tiff", "tiff",
"utfcpp", "utfcpp",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib" "zlib"
], ],
"features": { "features": {

View File

@ -6886,7 +6886,7 @@
}, },
"vtk": { "vtk": {
"baseline": "9.0.3-pv5.9.1", "baseline": "9.0.3-pv5.9.1",
"port-version": 1 "port-version": 2
}, },
"vtk-dicom": { "vtk-dicom": {
"baseline": "0.8.12", "baseline": "0.8.12",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "5e50a05b2ff0cc2f4df601ddb146c75a2f266a6a",
"version-semver": "9.0.3-pv5.9.1",
"port-version": 2
},
{ {
"git-tree": "413d7fcbff9b50e57e486d1249c841a5e25c0def", "git-tree": "413d7fcbff9b50e57e486d1249c841a5e25c0def",
"version-semver": "9.0.3-pv5.9.1", "version-semver": "9.0.3-pv5.9.1",