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)
#
# 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
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})
# 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})
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})