aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2021-09-14 04:34:11 +0200
committerGitHub <noreply@github.com>2021-09-13 19:34:11 -0700
commit333e0d4e5d59429d8977a70c777f9f51713e28a5 (patch)
treea2ab68ac2f888936a038e4f49217561cf2aba49a
parent045c1caf53c1fca59c1ffe6f9ea26adf2fe735f1 (diff)
downloadvcpkg-333e0d4e5d59429d8977a70c777f9f51713e28a5.tar.gz
vcpkg-333e0d4e5d59429d8977a70c777f9f51713e28a5.zip
[VTK] fix cmake patches not recycling targets already defined (#20074)
* [VTK] recycle alias targets if already defined * [VTK] bump port version * [VTK] fix references * [VTK] fix other patches for target recycling * [VTK] fix references Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
-rw-r--r--ports/vtk/FindHDF5.cmake17
-rw-r--r--ports/vtk/FindLZ4.patch4
-rw-r--r--ports/vtk/pegtl.patch4
-rw-r--r--ports/vtk/vcpkg.json1
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/v-/vtk.json5
6 files changed, 25 insertions, 8 deletions
diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake
index 1be15731b..27d8a8c74 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 dced8bf56..7f65de529 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 6374bb3a8..cbd1d8693 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 <jacob.benoit.1@gmail.com>
# 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 725ace01d..a22785db3 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 b59fd80b3..20a4ccf56 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 7cb9e0621..5b6741917 100644
--- a/versions/v-/vtk.json
+++ b/versions/v-/vtk.json
@@ -1,6 +1,11 @@
{
"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",
"port-version": 0