Skip to content

[vtk] WIP #46843

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
31 changes: 31 additions & 0 deletions ports/vtk-compile-tools/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
set(VCPKG_BUILD_TYPE release) # tools
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)

set(SHORT_VERSION 9.3)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Kitware/VTK
REF 09a76bc55b37caad94d0d8ebe865caaed1b438af # v9.3.x used by ParaView 5.12.0
SHA512 396ee901fafacae8aef860b9c9c17cb92ae8b4969527fd271ad8dd9f6a9e0dc8e3dc807c8d43cc585608ad101a64edcd7aff49e1580c7a61a817c2ea8e2655f5
HEAD_REF master
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DVTK_BUILD_COMPILE_TOOLS_ONLY=ON
-DVTK_ENABLE_LOGGING=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()

# Not adjusting the directory name: The package location is meant to be passed explicitly.
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/vtkcompiletools-${SHORT_VERSION})

vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES vtkParseJava-${SHORT_VERSION} vtkWrapHierarchy-${SHORT_VERSION} vtkWrapJava-${SHORT_VERSION} vtkWrapPython-${SHORT_VERSION} vtkWrapPythonInit-${SHORT_VERSION})

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include") # owned by port vtk

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Copyright.txt")
18 changes: 18 additions & 0 deletions ports/vtk-compile-tools/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "vtk-compile-tools",
"version-semver": "9.3.0-pv5.12.1",
"description": "Software system for 3D computer graphics, image processing, and visualization",
"homepage": "https://github.com/Kitware/VTK",
"license": null,
"supports": "native",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
12 changes: 12 additions & 0 deletions ports/vtk/libproj.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d477f8b..375a2a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -389,7 +389,6 @@ endif ()
# Handle the requirement of `sqlitebin` for `proj`.
set(vtk_sqlite_build_binary 0)
if ("VTK::libproj" IN_LIST vtk_modules)
- set(vtk_sqlite_build_binary 1)
endif ()

cmake_dependent_option(VTK_ENABLE_KITS "Enable kits compilation" OFF
diff --git a/ThirdParty/libproj/CMakeLists.txt b/ThirdParty/libproj/CMakeLists.txt
index f8888876..d57c4c18 100644
--- a/ThirdParty/libproj/CMakeLists.txt
Expand Down
84 changes: 35 additions & 49 deletions ports/vtk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ if(NOT VCPKG_TARGET_IS_WINDOWS)
message(WARNING "You will need to install Xorg dependencies to build vtk:\napt-get install libxt-dev\n")
endif()

set(VCPKG_POLICY_SKIP_ABSOLUTE_PATHS_CHECK enabled)

# =============================================================================
# Clone & patch
vcpkg_from_github(
Expand Down Expand Up @@ -136,26 +134,17 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS VTK_FEATURE_OPTIONS
"netcdf" VTK_MODULE_ENABLE_VTK_IOMINC
)

# Require port features to prevent accidental finding of transitive dependencies
# Lock port features to prevent accidental finding of transitive dependencies
vcpkg_check_features(OUT_FEATURE_OPTIONS PACKAGE_FEATURE_OPTIONS
FEATURES
"libtheora" CMAKE_REQUIRE_FIND_PACKAGE_THEORA
"libharu" CMAKE_REQUIRE_FIND_PACKAGE_LibHaru
"cgns" CMAKE_REQUIRE_FIND_PACKAGE_CGNS
"seacas" CMAKE_REQUIRE_FIND_PACKAGE_SEACASIoss
"seacas" CMAKE_REQUIRE_FIND_PACKAGE_SEACASExodus
"sql" CMAKE_REQUIRE_FIND_PACKAGE_SQLite3
"proj" CMAKE_REQUIRE_FIND_PACKAGE_PROJ
"netcdf" CMAKE_REQUIRE_FIND_PACKAGE_NetCDF
INVERTED_FEATURES
"libtheora" CMAKE_DISABLE_FIND_PACKAGE_THEORA
"libharu" CMAKE_DISABLE_FIND_PACKAGE_LibHaru
"cgns" CMAKE_DISABLE_FIND_PACKAGE_CGNS
"seacas" CMAKE_DISABLE_FIND_PACKAGE_SEACASIoss
"seacas" CMAKE_DISABLE_FIND_PACKAGE_SEACASExodus
"sql" CMAKE_DISABLE_FIND_PACKAGE_SQLite3
"proj" CMAKE_DISABLE_FIND_PACKAGE_PROJ
"netcdf" CMAKE_DISABLE_FIND_PACKAGE_NetCDF
FEATURES
"cgns" VCPKG_LOCK_FIND_PACKAGE_CGNS
"libharu" VCPKG_LOCK_FIND_PACKAGE_LibHaru
"libtheora" VCPKG_LOCK_FIND_PACKAGE_THEORA
"netcdf" VCPKG_LOCK_FIND_PACKAGE_NetCDF
"proj" VCPKG_LOCK_FIND_PACKAGE_PROJ
"seacas" VCPKG_LOCK_FIND_PACKAGE_SEACASIoss
"seacas" VCPKG_LOCK_FIND_PACKAGE_SEACASExodus
"sql" VCPKG_LOCK_FIND_PACKAGE_SQLite3
)

# Replace common value to vtk value
Expand Down Expand Up @@ -222,8 +211,12 @@ if("mpi" IN_LIST FEATURES AND "python" IN_LIST FEATURES)
)
endif()

if("cuda" IN_LIST FEATURES AND CMAKE_HOST_WIN32)
vcpkg_add_to_path("$ENV{CUDA_PATH}/bin")
if("cuda" IN_LIST FEATURES)
vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT cuda_toolkit_root)
list(APPEND ADDITIONAL_OPTIONS
"-DCMAKE_CUDA_COMPILER=${NVCC}"
"-DCUDAToolkit_ROOT=${cuda_toolkit_root}"
)
endif()

if("utf8" IN_LIST FEATURES)
Expand Down Expand Up @@ -255,19 +248,20 @@ if("openmp" IN_LIST FEATURES)
)
endif()

if("debugleaks" IN_LIST FEATURES)
if(VCPKG_CROSSCOMPILING)
list(APPEND ADDITIONAL_OPTIONS
-DVTK_DEBUG_LEAKS=ON
"-DVTKCompileTools_DIR=${CURRENT_HOST_INSTALLED_DIR}/share/vtk-compile-tools"
)
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"cuda" VTK_USE_CUDA
"mpi" VTK_USE_MPI
"all" VTK_BUILD_ALL_MODULES
"tbb" VTK_SMP_ENABLE_TBB
"openmp" VTK_SMP_ENABLE_OPENMP
"all" VTK_BUILD_ALL_MODULES
"cuda" VTK_USE_CUDA
"debugleaks" VTK_DEBUG_LEAKS
"mpi" VTK_USE_MPI
"openmp" VTK_SMP_ENABLE_OPENMP
"tbb" VTK_SMP_ENABLE_TBB
)

# =============================================================================
Expand All @@ -294,7 +288,6 @@ vcpkg_cmake_configure(
-DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg
# Select modules / groups to install
-DVTK_USE_EXTERNAL:BOOL=ON
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF # Not yet in VCPKG
-DVTK_MODULE_USE_EXTERNAL_VTK_token:BOOL=OFF # Not yet in VCPKG
#-DVTK_MODULE_ENABLE_VTK_jsoncpp=YES
${ADDITIONAL_OPTIONS}
Expand All @@ -307,26 +300,19 @@ vcpkg_cmake_configure(
MAYBE_UNUSED_VARIABLES
VTK_MODULE_ENABLE_VTK_PythonContext2D # Guarded by a conditional
VTK_MODULE_ENABLE_VTK_GUISupportMFC # only windows
VTK_QT_VERSION # Only with Qt
VTK_MODULE_ENABLE_VTK_vtkm
# Only with Qt
CMAKE_INSTALL_QMLDIR
VTK_QT_VERSION # Only with Qt
# When working properly these should be unused
CMAKE_DISABLE_FIND_PACKAGE_CGNS
CMAKE_DISABLE_FIND_PACKAGE_LibHaru
CMAKE_DISABLE_FIND_PACKAGE_NetCDF
CMAKE_DISABLE_FIND_PACKAGE_PROJ
CMAKE_DISABLE_FIND_PACKAGE_SEACASExodus
CMAKE_DISABLE_FIND_PACKAGE_SEACASIoss
CMAKE_DISABLE_FIND_PACKAGE_SQLite3
CMAKE_DISABLE_FIND_PACKAGE_THEORA
CMAKE_REQUIRE_FIND_PACKAGE_CGNS
CMAKE_REQUIRE_FIND_PACKAGE_LibHaru
CMAKE_REQUIRE_FIND_PACKAGE_NetCDF
CMAKE_REQUIRE_FIND_PACKAGE_PROJ
CMAKE_REQUIRE_FIND_PACKAGE_SEACASExodus
CMAKE_REQUIRE_FIND_PACKAGE_SEACASIoss
CMAKE_REQUIRE_FIND_PACKAGE_SQLite3
CMAKE_REQUIRE_FIND_PACKAGE_THEORA

VCPKG_LOCK_FIND_PACKAGE_CGNS
VCPKG_LOCK_FIND_PACKAGE_LibHaru
VCPKG_LOCK_FIND_PACKAGE_NetCDF
VCPKG_LOCK_FIND_PACKAGE_PROJ
VCPKG_LOCK_FIND_PACKAGE_SEACASExodus
VCPKG_LOCK_FIND_PACKAGE_SEACASIoss
VCPKG_LOCK_FIND_PACKAGE_SQLite3
VCPKG_LOCK_FIND_PACKAGE_THEORA
)

vcpkg_cmake_install()
Expand Down
42 changes: 11 additions & 31 deletions ports/vtk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vtk",
"version-semver": "9.3.0-pv5.12.1",
"port-version": 9,
"port-version": 10,
"description": "Software system for 3D computer graphics, image processing, and visualization",
"homepage": "https://github.com/Kitware/VTK",
"license": null,
Expand All @@ -19,6 +19,7 @@
"zlib"
]
},
"gl2ps",
"glew",
{
"name": "hdf5",
Expand Down Expand Up @@ -56,6 +57,11 @@
"host": true
},
"verdict",
{
"name": "vtk-compile-tools",
"host": true,
"platform": "!native"
},
"zlib"
],
"default-features": [
Expand Down Expand Up @@ -207,19 +213,13 @@
"name": "netcdf-c",
"default-features": false,
"features": [
"hdf5"
"netcdf-4"
]
}
]
},
"opengl": {
"description": "All opengl related modules",
"dependencies": [
{
"name": "vtk",
"default-features": false
}
]
"description": "All opengl related modules"
},
"openmp": {
"description": "Use openmp multithreading parallel implementation"
Expand Down Expand Up @@ -261,13 +261,6 @@
{
"name": "proj",
"default-features": false
},
{
"name": "vtk",
"default-features": false,
"features": [
"sql"
]
}
]
},
Expand All @@ -290,14 +283,7 @@
"widgets"
]
},
"qtdeclarative",
{
"name": "vtk",
"default-features": false,
"features": [
"sql"
]
}
"qtdeclarative"
]
},
"seacas": {
Expand Down Expand Up @@ -330,13 +316,7 @@
]
},
"utf8": {
"description": "Enables vtk reader/writer with utf-8 path support",
"dependencies": [
{
"name": "vtk",
"default-features": false
}
]
"description": "Enables vtk reader/writer with utf-8 path support"
},
"vtkm": {
"description": "Build with vtk-m accelerator and module.",
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
- name: tripletPattern
displayName: 'Enable triplets which contain this substring'
type: string
default: '-'
default: '^arm64-windows'

jobs:
- template: windows/azure-pipelines.yml
Expand Down
3 changes: 1 addition & 2 deletions scripts/ci.feature.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ google-cloud-cpp[accessapproval,accesscontextmanager,advisorynotifications,alloy
halide[target-aarch64,target-all,target-amdgpu,target-arm,target-d3d12compute,target-hexagon,target-metal,target-nvptx,target-opencl,target-opengl-compute,target-powerpc,target-riscv,target-webassembly,target-x86] = no-separate-feature-test
llvm[target-aarch64,target-all,target-amdgpu,target-arc,target-arm,target-avr,target-bpf,target-csky,target-directx,target-hexagon,target-lanai,target-loongarch,target-m68k,target-mips,target-msp430,target-nvptx,target-powerpc,target-riscv,target-sparc,target-spirv,target-systemz,target-ve,target-webassembly,target-x86,target-xcore,target-xtensa] = no-separate-feature-test
qtbase[doubleconversion,gui,sql,thread] = no-separate-feature-test # covered in many combinations

vtk[debugleaks] = no-separate-feature-test

# cascade
3fd:x64-uwp = cascade
Expand Down Expand Up @@ -2246,7 +2246,6 @@ vtk[seacas](windows & arm64 & !uwp) = feature-fails
vtk[sql]:arm64-windows = feature-fails
vtk[tbb]:arm64-windows = feature-fails
vtk-m[omp](osx) = feature-fails # fixed by https://github.com/microsoft/vcpkg/pull/30923
vtk(arm64 & windows & !uwp) = fail
wasmedge[aot] = feature-fails # ar: /libzstd.a: No such file or directory. See https://github.com/microsoft/vcpkg/issues/32146
wayland[force-build](native) = feature-fails # error: To build wayland libraries the `force-build` feature must be enabled and the X_VCPKG_FORCE_VCPKG_WAYLAND_LIBRARIES triplet variable must be set.
xbitmaps(osx) = fail # error: must install xorg-macros 1.3 or later before running autoconf/autogen
Expand Down
6 changes: 5 additions & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -10114,7 +10114,11 @@
},
"vtk": {
"baseline": "9.3.0-pv5.12.1",
"port-version": 9
"port-version": 10
},
"vtk-compile-tools": {
"baseline": "9.3.0-pv5.12.1",
"port-version": 0
},
"vtk-dicom": {
"baseline": "0.8.16",
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": "fc28ffcf0b0465556dda75fa28b379f609f50226",
"version-semver": "9.3.0-pv5.12.1",
"port-version": 10
},
{
"git-tree": "84460a0060d3289c25e17e2837e4de4329051fbb",
"version-semver": "9.3.0-pv5.12.1",
Expand Down
9 changes: 9 additions & 0 deletions versions/v-/vtkcompiletools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "56c51dab88978b4c498e81b4aa46eb6e94a4f00a",
"version-semver": "9.3.0-pv5.12.1",
"port-version": 0
}
]
}
Loading