From: Pascal Obry Date: Fri, 31 Jan 2020 14:53:49 +0000 (+0100) Subject: Porting to ParaView 5.8 X-Git-Tag: V9_5_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=293d436399f92c5ac3790c025e69dff463f5b5a5;p=tools%2Fconfiguration.git Porting to ParaView 5.8 --- diff --git a/cmake/FindSalomeParaView.cmake b/cmake/FindSalomeParaView.cmake index d97e8f6..6e01146 100644 --- a/cmake/FindSalomeParaView.cmake +++ b/cmake/FindSalomeParaView.cmake @@ -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) diff --git a/cmake/FindSalomeVTK.cmake b/cmake/FindSalomeVTK.cmake index 4e70438..5389e45 100644 --- a/cmake/FindSalomeVTK.cmake +++ b/cmake/FindSalomeVTK.cmake @@ -25,19 +25,18 @@ # # 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}) diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index 64c10ad..3b1d3c0 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -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})