]> SALOME platform Git repositories - tools/configuration.git/commitdiff
Salome HOME
Porting to ParaView 5.8 rnv/pv58_2
authorPascal Obry <pascal.obry@edf.fr>
Fri, 31 Jan 2020 14:53:49 +0000 (15:53 +0100)
committervsr <vsr@opencascade.com>
Thu, 5 Mar 2020 13:57:44 +0000 (16:57 +0300)
cmake/FindSalomeParaView.cmake
cmake/FindSalomeVTK.cmake
cmake/SalomeMacros.cmake

index d97e8f64bc459892ba5fd1436859ee1c835d06de..6e011462a191d5f2a444a240f22111949d1b4c23 100644 (file)
@@ -28,12 +28,4 @@ IF(NOT QT_VERSION)
   MESSAGE(FATAL_ERROR "Detection of ParaView requires Qt to be detected first!")
 ENDIF()
 
-IF (QT_VERSION VERSION_LESS "5.0")
-  SET(PARAVIEW_QT_VERSION "4")
-ELSE()
-  SET(PARAVIEW_QT_VERSION "5")
-ENDIF()
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(ParaView PARAVIEW_USE_FILE 4)
-
-INCLUDE(${PARAVIEW_USE_FILE})
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(ParaView ParaView_PREFIX_PATH 0)
index 4e70438adf503d8b4613d38e4b3ee4b22e97c0d5..5389e458d9495939049435f297741ac1768cd7f4 100644 (file)
 #
 
 # List the required components:
-SET(SalomeVTK_COMPONENTS 
-  vtkRenderingLOD 
-  vtkRenderingAnnotation 
-  vtkFiltersParallel
-  vtkIOExport
-  vtkWrappingPythonCore  ## ParaView 4.0.1
-  #vtkWrappingPython
-  vtkIOXML
-  vtkFiltersVerdict
-  vtkRenderingLabel
-  vtkInteractionWidgets
-  vtkInfovisCore
-  vtkInteractionStyle
+SET(SalomeVTK_COMPONENTS
+  RenderingLOD 
+  RenderingAnnotation 
+  FiltersParallel
+  IOExport
+  WrappingPythonCore  ## ParaView 4.0.1
+  IOXML
+  FiltersVerdict
+  RenderingLabel
+  InteractionWidgets
+  InfovisCore
+  InteractionStyle
 )
 
 #   Seting the following variable is equivalent to having passed the components
@@ -49,21 +48,22 @@ SET(PARAVIEW_ROOT_DIR "$ENV{PARAVIEW_ROOT_DIR}" CACHE PATH "Path to the ParaView
 IF(EXISTS "${PARAVIEW_ROOT_DIR}" AND (NOT VTK_ROOT_DIR))
   MESSAGE(STATUS "Looking for VTK in the ParaView installation (PARAVIEW_ROOT_DIR exists and VTK_ROOT_DIR is not defined) ...")
   
-  # Extract sub-directory "paraview-x.xx":
-  FILE(GLOB VTK_DIR "${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-[1-9].[0-9]*")
+  # Extract VTK configuration directory from Paraview:
+  FILE(GLOB VTK_DIR "${PARAVIEW_ROOT_DIR}/lib/cmake/paraview-[1-9].[0-9]*/vtk")
+  IF(NOT VTK_DIR)
+    FILE(GLOB VTK_DIR "${PARAVIEW_ROOT_DIR}/lib64/cmake/paraview-[1-9].[0-9]*/vtk")
+  ENDIF()
   MESSAGE(STATUS "Setting VTK_DIR to: ${VTK_DIR}") 
 ENDIF()
 
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(VTK VTK_INCLUDE_DIRS 2)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(VTK VTK_PREFIX_PATH 0)
 MARK_AS_ADVANCED(VTK_DIR)
 
 IF(VTK_FOUND)
   MESSAGE(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
-  #MESSAGE(STATUS "VTK libraries are: ${VTK_LIBRARIES}")
 ENDIF()
 
 IF(VTK_FOUND) 
-  SALOME_ACCUMULATE_HEADERS(VTK_INCLUDE_DIRS)
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${VTK_LIBRARIES})
   SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${VTK_LIBRARIES})
   SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH ${VTK_LIBRARIES})
index 64c10addb359b3e7a2f34a575f7bbe700faa32e4..3b1d3c075cc523942f1fded50f1945c15267ae04 100644 (file)
@@ -573,7 +573,7 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
        #  Note the double de-reference of "referenceVariable":
        SET(_tmp_ROOT_DIR "${${referenceVariable}}")
     ENDIF()
-    # Up cound can be reset by detection procedure
+    # Up count can be reset by detection procedure
     SET(_upCount ${upCount})
     IF(DEFINED ${pkg_UC}_UPCOUNT)
       SET(_upCount ${${pkg_UC}_UPCOUNT})
@@ -747,8 +747,11 @@ MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
       IF(_is_check)
         IF(NOT IS_DIRECTORY ${_item})
           IF(TARGET ${_item})
-            GET_TARGET_PROPERTY(_item ${_item} LOCATION)
-          ENDIF()        
+            GET_TARGET_PROPERTY(_target_type ${_item} TYPE)
+            IF(NOT ${_target_type} STREQUAL "INTERFACE_LIBRARY")
+              GET_TARGET_PROPERTY(_item ${_item} LOCATION)
+            ENDIF()
+          ENDIF()
           GET_FILENAME_COMPONENT(_item ${_item} PATH)
         ENDIF()    
         IF(EXISTS ${_item})