Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 9 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions ports/vtk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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")
5 changes: 5 additions & 0 deletions ports/vtk/usage
Original file line number Diff line number Diff line change
@@ -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})
10 changes: 9 additions & 1 deletion ports/vtk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -35,6 +35,14 @@
"sqlite3",
"tiff",
"utfcpp",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
],
"features": {
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6850,7 +6850,7 @@
},
"vtk": {
"baseline": "9.0.3-pv5.9.1",
"port-version": 1
"port-version": 2
},
"vtk-dicom": {
"baseline": "0.8.12",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vtk.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down