diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2020-12-11 23:16:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-11 14:16:29 -0800 |
| commit | e054fe2b20469c894b88be4ac466776f9f653954 (patch) | |
| tree | c38d367b5974c69f7d824b96f8dcdf594dd32041 /ports/vtk | |
| parent | c2329ab26a6e9e06da101d8541c393c102ba6c8c (diff) | |
| download | vcpkg-e054fe2b20469c894b88be4ac466776f9f653954.tar.gz vcpkg-e054fe2b20469c894b88be4ac466776f9f653954.zip | |
[OpenCV] fix compatibility with VTK9 (#12785)
Diffstat (limited to 'ports/vtk')
| -rw-r--r-- | ports/vtk/module-name-mangling.patch | 18 | ||||
| -rw-r--r-- | ports/vtk/portfile.cmake | 23 |
2 files changed, 30 insertions, 11 deletions
diff --git a/ports/vtk/module-name-mangling.patch b/ports/vtk/module-name-mangling.patch new file mode 100644 index 000000000..d1bc96c39 --- /dev/null +++ b/ports/vtk/module-name-mangling.patch @@ -0,0 +1,18 @@ +--- a/CMake/vtkModule.cmake ++++ b/CMake/vtkModule.cmake +@@ -4409,6 +4409,15 @@ endif ()\n\n") + foreach (_vtk_export_module IN LISTS _vtk_export_MODULES) + get_property(_vtk_export_target_name GLOBAL + PROPERTY "_vtk_module_${_vtk_export_module}_target_name") ++ # Use the export name of the target if it has one set. ++ get_property(_vtk_export_target_has_export_name ++ TARGET "${_vtk_export_target_name}" ++ PROPERTY EXPORT_NAME SET) ++ if (_vtk_export_target_has_export_name) ++ get_property(_vtk_export_target_name ++ TARGET "${_vtk_export_target_name}" ++ PROPERTY EXPORT_NAME) ++ endif () + set(_vtk_export_base "_vtk_module_find_package_${_vtk_export_module}") + get_property(_vtk_export_packages GLOBAL + PROPERTY "${_vtk_export_base}") diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index d2dc3e2c7..c3ebfbe6e 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -123,9 +123,10 @@ vcpkg_from_github( vtkm.patch # To include an external VTKm build (v.1.5 required) pegtl.patch pythonwrapper.patch # Required by ParaView to Wrap required classes - NoUndefDebug.patch # Required to link against correct Python library depending on build type. + NoUndefDebug.patch # Required to link against correct Python library depending on build type. python_debug.patch fix-using-hdf5.patch + module-name-mangling.patch # Last patch TODO: Patch out internal loguru FindExpat.patch # The find_library calls are taken care of by vcpkg-cmake-wrapper.cmake of expat ) @@ -271,29 +272,25 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# ============================================================================= -# Handle copyright -file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/vtk") ## Files Modules needed by ParaView if("paraview" IN_LIST FEATURES) - set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType + set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType vtkSupportMacros vtkDirectories vtkVersion FindPythonModules vtkModuleDebugging vtkExternalData) foreach(module ${VTK_CMAKE_NEEDED}) file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") endforeach() - + ## Check List on UPDATE !! file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") file(INSTALL "${SOURCE_PATH}/GUISupport/Qt/QVTKOpenGLWidget.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # Legacy header - + file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRange.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRangeIterableTraits.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK file(INSTALL "${SOURCE_PATH}/Common/DataModel/vtkCompositeDataSetNodeReference.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK - #ParaView requires some internal headers + #ParaView requires some internal headers file(INSTALL "${SOURCE_PATH}/Rendering/Annotation/vtkScalarBarActorInternal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") file(INSTALL "${SOURCE_PATH}/Filters/Statistics/vtkStatisticsAlgorithmPrivate.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") file(INSTALL "${SOURCE_PATH}/Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") @@ -306,13 +303,13 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) endif() endif() - + #remove one get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY) from vtk-prefix.cmake and VTK-vtk-module-properties and vtk-python.cmake set(filenames_fix_prefix vtk-prefix VTK-vtk-module-properties vtk-python) foreach(name IN LISTS filenames_fix_prefix) if(EXISTS "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake") file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" _contents) - string(REPLACE + string(REPLACE [[set(_vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}") get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY)]] [[set(_vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}")]] _contents "${_contents}") @@ -321,3 +318,7 @@ else() debug_message("FILE:${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake does not exist! No prefix correction!") endif() endforeach() + +# ============================================================================= +# Handle copyright +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
