summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/mia-vtk9.patch
blob: a8f1adab6c2d8fe48f15ee9c72d314520d949368 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
This patch has been taken from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012689
--- a/addons/vtk/CMakeLists.txt
+++ b/addons/vtk/CMakeLists.txt
@@ -20,9 +20,9 @@
 
 IF(WITH_VTKIO)
   if (STRICT_DEPENDECIES)
-    FIND_PACKAGE(VTK REQUIRED COMPONENTS  vtkIOImage  vtkIOXML vtkIOLegacy)
+    FIND_PACKAGE(VTK REQUIRED COMPONENTS  IOImage IOXML IOLegacy)
   else (STRICT_DEPENDECIES)
-    FIND_PACKAGE(VTK COMPONENTS vtkIOImage vtkIOXML vtkIOLegacy)
+    FIND_PACKAGE(VTK COMPONENTS IOImage IOXML IOLegacy)
   endif (STRICT_DEPENDECIES)
   IF(VTK_FOUND)
     DEFINE_PROPERTY(GLOBAL PROPERTY HAVE_VTK_PROP BRIEF_DOCS "yeah" FULL_DOCS "yeah")
@@ -41,8 +41,17 @@
     SET(VTK_LINK_LIBS_3D ${SELECTED_VTK_LIBS} mia3d)
 
     PLUGIN_WITH_TEST_AND_PREFIX2("mesh" "io" vtkmesh "${VTK_LINK_LIBS_MESH}")
+    target_link_libraries(mesh-io-vtkmesh ${VTK_LIBRARIES})
+    target_link_libraries(mesh-io-vtkmesh-common ${VTK_LIBRARIES})
+    target_link_libraries(test-mesh-io-vtkmesh ${VTK_LIBRARIES})
     PLUGIN_WITH_TEST_AND_PREFIX2("3dvf" "io" vtkvf "${VTK_LINK_LIBS_3D}")
+    target_link_libraries(3dvf-io-vtkvf ${VTK_LIBRARIES})
+    target_link_libraries(3dvf-io-vtkvf-common ${VTK_LIBRARIES})
+    target_link_libraries(test-3dvf-io-vtkvf ${VTK_LIBRARIES})
     PLUGIN_WITH_TEST_AND_PREFIX2("3dimage" "io" vtkimage "${VTK_LINK_LIBS_3D}")
+    target_link_libraries(3dimage-io-vtkimage ${VTK_LIBRARIES})
+    target_link_libraries(3dimage-io-vtkimage-common ${VTK_LIBRARIES})
+    target_link_libraries(test-3dimage-io-vtkimage ${VTK_LIBRARIES})
 
   ELSEIF(VTK_FOUND)
     MESSAGE(MESSAGE "VTK not found, disabled")
--- a/addons/vtk/vtkmesh.cc
+++ b/addons/vtk/vtkmesh.cc
@@ -78,7 +78,8 @@
        // read all cells, if a cell is formed of more than 3 corners, then triangulate,
        // if it hes less then 3 corners, ignore it (no wireframes supported here
        auto triangles = CVtkMeshIO::PTrianglefield(new CVtkMeshIO::CTrianglefield ());
-       vtkIdType npts, *pts;
+       vtkIdType npts;
+       vtkIdType const *pts;
        auto strips = mesh.GetStrips();
 
        while (strips->GetNextCell(npts, pts)) {
@@ -183,7 +184,7 @@
        auto is = mesh.normals_begin();
 
        for (auto i = 0; i < n_normals; ++i, ++is) {
-              normals->GetTupleValue(i, &is->x);
+              normals->GetTypedTuple(i, &is->x);
               cvdebug() << i << ": read normal " << *is << "\n";
        }
 }
@@ -217,7 +218,7 @@
        auto is = mesh.color_begin();
 
        for (auto i = 0; i < n_colors; ++i, ++is)
-              colors->GetTupleValue(i, &is->x);
+              colors->GetTypedTuple(i, &is->x);
 }
 
 PTriangleMesh CVtkMeshIO::do_load(string const&   filename) const