diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index b9af50ad87860d..adfb0f3a0bf09d 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -164,9 +164,8 @@ file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake # Configure & Install # 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} - PREFER_NINJA OPTIONS ${FEATURE_OPTIONS} -DBUILD_TESTING=OFF -DVTK_BUILD_TESTING=OFF @@ -185,12 +184,12 @@ vcpkg_configure_cmake( ${ADDITIONAL_OPTIONS} ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() # ============================================================================= # 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 @@ -306,6 +305,13 @@ else() endif() 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 file(INSTALL "${SOURCE_PATH}/Copyright.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") diff --git a/ports/vtk/usage b/ports/vtk/usage new file mode 100644 index 00000000000000..bba2f639079441 --- /dev/null +++ b/ports/vtk/usage @@ -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}) diff --git a/ports/vtk/vcpkg.json b/ports/vtk/vcpkg.json index a22785db36c0dd..2437c229223187 100644 --- a/ports/vtk/vcpkg.json +++ b/ports/vtk/vcpkg.json @@ -1,7 +1,7 @@ { "name": "vtk", "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", "homepage": "https://github.com/Kitware/VTK", "dependencies": [ @@ -35,6 +35,14 @@ "sqlite3", "tiff", "utfcpp", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, "zlib" ], "features": { diff --git a/versions/baseline.json b/versions/baseline.json index 1252bd05254d8e..7da820193be2d5 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6850,7 +6850,7 @@ }, "vtk": { "baseline": "9.0.3-pv5.9.1", - "port-version": 1 + "port-version": 2 }, "vtk-dicom": { "baseline": "0.8.12", diff --git a/versions/v-/vtk.json b/versions/v-/vtk.json index 5b674191725d7a..6022f3fefc12ae 100644 --- a/versions/v-/vtk.json +++ b/versions/v-/vtk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5e50a05b2ff0cc2f4df601ddb146c75a2f266a6a", + "version-semver": "9.0.3-pv5.9.1", + "port-version": 2 + }, { "git-tree": "413d7fcbff9b50e57e486d1249c841a5e25c0def", "version-semver": "9.0.3-pv5.9.1",