[vtk] Use PROJ CMake config (#32138)

This commit is contained in:
Kai Pastor 2023-06-27 07:49:51 +02:00 committed by GitHub
parent b857d948bc
commit f27bfa26dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 23 deletions

View File

@ -1,20 +0,0 @@
diff --git a/CMake/FindLibPROJ.cmake b/CMake/FindLibPROJ.cmake
index 6f607d4..86c85a9 100644
--- a/CMake/FindLibPROJ.cmake
+++ b/CMake/FindLibPROJ.cmake
@@ -1,5 +1,5 @@
find_path(LibPROJ_INCLUDE_DIR
- NAMES proj_api.h proj.h
+ NAMES proj.h
DOC "libproj include directories")
mark_as_advanced(LibPROJ_INCLUDE_DIR)
@@ -9,7 +9,7 @@ find_library(LibPROJ_LIBRARY_RELEASE
mark_as_advanced(LibPROJ_LIBRARY_RELEASE)
find_library(LibPROJ_LIBRARY_DEBUG
- NAMES projd
+ NAMES projd proj_d proj NAMES_PER_DIR
DOC "libproj debug library")
mark_as_advanced(LibPROJ_LIBRARY_DEBUG)

20
ports/vtk/libproj.patch Normal file
View File

@ -0,0 +1,20 @@
diff --git a/ThirdParty/libproj/CMakeLists.txt b/ThirdParty/libproj/CMakeLists.txt
index f8888876..d57c4c18 100644
--- a/ThirdParty/libproj/CMakeLists.txt
+++ b/ThirdParty/libproj/CMakeLists.txt
@@ -4,10 +4,12 @@ vtk_module_third_party(
VERSION "8.1.0"
STANDARD_INCLUDE_DIRS
EXTERNAL
- PACKAGE LibPROJ
- TARGETS LibPROJ::LibPROJ
- USE_VARIABLES LibPROJ_MAJOR_VERSION
+ PACKAGE PROJ
+ CONFIG_MODE
+ TARGETS PROJ::proj
+ USE_VARIABLES PROJ_VERSION_MAJOR
STANDARD_INCLUDE_DIRS)
+set(LibPROJ_MAJOR_VERSION "${PROJ_VERSION_MAJOR}")
if (NOT VTK_MODULE_USE_EXTERNAL_VTK_libproj)
set(LibPROJ_MAJOR_VERSION "8")

View File

@ -23,7 +23,7 @@ vcpkg_from_github(
PATCHES
FindLZMA.patch
FindLZ4.patch
Findproj.patch
libproj.patch
pegtl.patch
pythonwrapper.patch # Required by ParaView to Wrap required classes
NoUndefDebug.patch # Required to link against correct Python library depending on build type.

View File

@ -1,7 +1,7 @@
{
"name": "vtk",
"version-semver": "9.2.0-pv5.11.0",
"port-version": 7,
"port-version": 8,
"description": "Software system for 3D computer graphics, image processing, and visualization",
"homepage": "https://github.com/Kitware/VTK",
"license": "BSD-3-Clause",

View File

@ -8518,7 +8518,7 @@
},
"vtk": {
"baseline": "9.2.0-pv5.11.0",
"port-version": 7
"port-version": 8
},
"vtk-dicom": {
"baseline": "0.8.14",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8f707a1fc800b17b84e545a4aa5b9f2c3c28c6d6",
"version-semver": "9.2.0-pv5.11.0",
"port-version": 8
},
{
"git-tree": "9ec376669498a8b43b3dc1779386dcc383d7cc1f",
"version-semver": "9.2.0-pv5.11.0",