Browse Source

Better warnings about 8.90

iss7
Trevor Irons 5 years ago
parent
commit
21ae0ab38b
2 changed files with 42 additions and 16 deletions
  1. 1
    13
      CMake/SuperBuild.cmake
  2. 41
    3
      CMakeLists.txt

+ 1
- 13
CMake/SuperBuild.cmake View File

38
 endif()
38
 endif()
39
 
39
 
40
 if ( LEMMA_VTK8_SUPPORT )
40
 if ( LEMMA_VTK8_SUPPORT )
41
-    find_package(VTK 8)
42
-#   find_package(VTK 8.9 COMPONENTS vtkCommonCore vtkRenderingCore vtkFiltersCore vtkFiltersSources 
43
-#           vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkIOGeometry vtkInteractionStyle 
44
-#           vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
45
-    #find_package(VTK 8 NO_MODULE) 
46
-            #vtkCommonDataModel vtkFiltersHyperTree vtkIOXML vtkIOImage vtkIOLegacy vtkIOGeometry vtkInteractionStyle 
47
-            #vtkRenderingAnnotation vtkFiltersHybrid vtkFiltersModeling vtkRenderingVolumeOpenGL2 NO_MODULE)
48
     if ( NOT VTK_FOUND OR  VTK_VERSION VERSION_GREATER "8.2.0" )
41
     if ( NOT VTK_FOUND OR  VTK_VERSION VERSION_GREATER "8.2.0" )
49
-        #message(FATAL_ERROR "VTK 8 was found, but the wrong one! " ${VTK_VERSION}, ${VTK_MINOR_VERSION}, ${VTK_USE_FILE} ) 
50
-        #endif()
51
-        #if ( VTK_VERSION VERSION_GREATER "8.20.0" ) # or VTK_DIR-NOTFOUND)
52
-        #message( AUTHOR_WARNING  "VTK > 8.20.0 was found! " ${VTK_VERSION}, ${VTK_MINOR_VERSION}, ${VTK_USE_FILE} )
53
-        #message( FATAL_ERROR  "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
54
-        message( STATUS  "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
42
+        message( STATUS "VTK > 8.20.0 was found! Version found: " ${VTK_VERSION}, ${VTK_USE_FILE} )
55
         message( STATUS "External build of VTK 8 has been added, this may take some time to build." )
43
         message( STATUS "External build of VTK 8 has been added, this may take some time to build." )
56
         ExternalProject_Add(VTK8
44
         ExternalProject_Add(VTK8
57
         GIT_REPOSITORY "https://gitlab.kitware.com/vtk/vtk.git"
45
         GIT_REPOSITORY "https://gitlab.kitware.com/vtk/vtk.git"

+ 41
- 3
CMakeLists.txt View File

60
     project (CHECKSUPERBUILD CXX) # Necessary for VTK query 
60
     project (CHECKSUPERBUILD CXX) # Necessary for VTK query 
61
     find_package (yaml-cpp 0.6         PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Serialisation of classes 
61
     find_package (yaml-cpp 0.6         PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Serialisation of classes 
62
     find_package (Eigen3   3.3         PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Matrix/Vector & Math
62
     find_package (Eigen3   3.3         PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Matrix/Vector & Math
63
-    if (LEMMA_VTK8_SUPPORT)
64
-        find_package (VTK  8.2.0 EXACT PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH) # Visualization 
63
+    if (LEMMA_VTK8_SUPPORT)                                                            # Visualisation 
64
+        find_package (VTK  8.2.0       PATHS ${CMAKE_INSTALL_PREFIX}  NO_DEFAULT_PATH 
65
+        COMPONENTS 
66
+        vtkCommonCore 
67
+        vtkRenderingCore 
68
+        vtkFiltersCore 
69
+        vtkFiltersSources 
70
+        vtkCommonDataModel 
71
+        vtkFiltersHyperTree 
72
+        vtkIOXML 
73
+        vtkIOImage 
74
+        vtkIOLegacy 
75
+        vtkIOGeometry 
76
+        vtkInteractionStyle 
77
+        vtkRenderingAnnotation 
78
+        vtkFiltersHybrid 
79
+        vtkFiltersModeling 
80
+        vtkRenderingVolumeOpenGL2
81
+        QUIET 
82
+        ) 
65
     endif()
83
     endif()
66
 else()
84
 else()
67
     find_package (Eigen3   3.3 QUIET )  # Matrix/Vector & Math
85
     find_package (Eigen3   3.3 QUIET )  # Matrix/Vector & Math
68
     find_package (yaml-cpp 0.6 QUIET )  # Serialisation of classes 
86
     find_package (yaml-cpp 0.6 QUIET )  # Serialisation of classes 
69
     if (LEMMA_VTK8_SUPPORT)
87
     if (LEMMA_VTK8_SUPPORT)
70
-        find_package (VTK  8.2 QUIET )  # Visualization 
88
+        find_package (VTK  8.2 COMPONENTS
89
+        vtkCommonCore 
90
+        vtkRenderingCore 
91
+        vtkFiltersCore 
92
+        vtkFiltersSources 
93
+        vtkCommonDataModel 
94
+        vtkFiltersHyperTree 
95
+        vtkIOXML 
96
+        vtkIOImage 
97
+        vtkIOLegacy 
98
+        vtkIOGeometry 
99
+        vtkInteractionStyle 
100
+        vtkRenderingAnnotation 
101
+        vtkFiltersHybrid 
102
+        vtkFiltersModeling 
103
+        vtkRenderingVolumeOpenGL2 
104
+        QUIET )  
71
     endif()
105
     endif()
72
 endif()
106
 endif()
73
 
107
 
74
 INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIR})
108
 INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIR})
109
+if (VTK_VERSION VERSION_GREATER "8.2.0")
110
+    message( STATUS "${VTK_VERSION} is compatible??  ${VTK_VERSION_COMPATIBLE}")
111
+    set (VTK_FOUND False) 
112
+endif()
75
 if (VTK_FOUND)
113
 if (VTK_FOUND)
76
     set(volumeRenderer volumerenderer.cxx)
114
     set(volumeRenderer volumerenderer.cxx)
77
 	add_definitions(-DLEMMAUSEVTK) 
115
 	add_definitions(-DLEMMAUSEVTK) 

Loading…
Cancel
Save