diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake index 1be15731bf41b9..27d8a8c74c8247 100644 --- a/ports/vtk/FindHDF5.cmake +++ b/ports/vtk/FindHDF5.cmake @@ -1,20 +1,27 @@ -#The original VTK file is overdoing it and still prdouces errors that the target hdf5::hdf5_hl-shared cannot be found in dynamic builds find_package(hdf5 QUIET NO_MODULE) if(TARGET hdf5::hdf5-shared) set_target_properties(hdf5::hdf5-shared PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(hdf5::hdf5 ALIAS hdf5::hdf5-shared) + if(NOT TARGET hdf5::hdf5) + add_library(hdf5::hdf5 ALIAS hdf5::hdf5-shared) + endif() elseif(TARGET hdf5::hdf5-static) set_target_properties(hdf5::hdf5-static PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(hdf5::hdf5 ALIAS hdf5::hdf5-static) + if(NOT TARGET hdf5::hdf5) + add_library(hdf5::hdf5 ALIAS hdf5::hdf5-static) + endif() else() message(FATAL_ERROR "HDF5 target not found") endif() if(TARGET hdf5::hdf5_hl-shared) set_target_properties(hdf5::hdf5_hl-shared PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-shared) + if(NOT TARGET hdf5::hdf5_hl) + add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-shared) + endif() elseif(TARGET hdf5::hdf5_hl-static) set_target_properties(hdf5::hdf5_hl-static PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-static) + if(NOT TARGET hdf5::hdf5_hl) + add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-static) + endif() else() message(FATAL_ERROR "HDF5 HL target not found") endif() diff --git a/ports/vtk/FindLZ4.patch b/ports/vtk/FindLZ4.patch index dced8bf56ffd56..7f65de529cd788 100644 --- a/ports/vtk/FindLZ4.patch +++ b/ports/vtk/FindLZ4.patch @@ -2,7 +2,7 @@ diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake index 8c94e3bcd..ade3f9451 100644 --- a/CMake/FindLZ4.cmake +++ b/CMake/FindLZ4.cmake -@@ -1,38 +1,3 @@ +@@ -1,38 +1,5 @@ -find_path(LZ4_INCLUDE_DIR - NAMES lz4.h - DOC "lz4 include directory") @@ -43,5 +43,7 @@ index 8c94e3bcd..ade3f9451 100644 -endif () +find_package(LZ4 CONFIG REQUIRED) +set_target_properties(lz4::lz4 PROPERTIES IMPORTED_GLOBAL TRUE) ++if(NOT TARGET LZ4::LZ4) +add_library(LZ4::LZ4 ALIAS lz4::lz4) ++endif() \ No newline at end of file diff --git a/ports/vtk/pegtl.patch b/ports/vtk/pegtl.patch index 6374bb3a842307..cbd1d86930c86f 100644 --- a/ports/vtk/pegtl.patch +++ b/ports/vtk/pegtl.patch @@ -2,7 +2,7 @@ diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake index 73eee02f7..22d8bc159 100644 --- a/CMake/FindPEGTL.cmake +++ b/CMake/FindPEGTL.cmake -@@ -19,31 +19,40 @@ +@@ -19,31 +19,42 @@ # Copyright (c) 2009 Benoit Jacob # Redistribution and use is allowed according to the terms of the 2-clause BSD license. @@ -16,7 +16,9 @@ index 73eee02f7..22d8bc159 100644 +if(TARGET taocpp::pegtl) + message(STATUS "Searching for PEGTL - found target taocpp::pegtl") + set_target_properties(taocpp::pegtl PROPERTIES IMPORTED_GLOBAL TRUE) ++ if(NOT TARGET PEGTL::PEGTL) + add_library(PEGTL::PEGTL ALIAS taocpp::pegtl) ++ endif() +else() + find_path(PEGTL_INCLUDE_DIR + NAMES pegtl/version.hpp diff --git a/ports/vtk/vcpkg.json b/ports/vtk/vcpkg.json index 725ace01db526e..a22785db36c0dd 100644 --- a/ports/vtk/vcpkg.json +++ b/ports/vtk/vcpkg.json @@ -1,6 +1,7 @@ { "name": "vtk", "version-semver": "9.0.3-pv5.9.1", + "port-version": 1, "description": "Software system for 3D computer graphics, image processing, and visualization", "homepage": "https://github.com/Kitware/VTK", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index deb8ee639d07ac..7af1d7bed31f6f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6750,7 +6750,7 @@ }, "vtk": { "baseline": "9.0.3-pv5.9.1", - "port-version": 0 + "port-version": 1 }, "vtk-dicom": { "baseline": "0.8.12", diff --git a/versions/v-/vtk.json b/versions/v-/vtk.json index 7cb9e0621b196d..5b674191725d7a 100644 --- a/versions/v-/vtk.json +++ b/versions/v-/vtk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "413d7fcbff9b50e57e486d1249c841a5e25c0def", + "version-semver": "9.0.3-pv5.9.1", + "port-version": 1 + }, { "git-tree": "87526609113852b1b1c4a1fdc40c96a61b7c0b47", "version-semver": "9.0.3-pv5.9.1",