]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Correctly check ParaView (depending on Qt version)
authorvsr <vsr@opencascade.com>
Thu, 19 Nov 2015 10:35:10 +0000 (13:35 +0300)
committervsr <vsr@opencascade.com>
Thu, 19 Nov 2015 10:35:10 +0000 (13:35 +0300)
CMakeLists.txt
adm_local/cmake_files/FindSalomeParaView.cmake
adm_local/cmake_files/FindSalomeQt4.cmake
adm_local/cmake_files/FindSalomeQt5.cmake

index 175ad8ca147a3ab7f8a164ff64825d78b56550e4..d59f610a6e490fa6a790a916d082ffa97c3ed5ec 100755 (executable)
@@ -184,9 +184,6 @@ ELSE()
   ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
 ENDIF()
 IF (SALOME_USE_PVVIEWER)
-  IF(SALOME_BUILD_WITH_QT5)
-    SET(PARAVIEW_QT_VERSION "5")
-  ENDIF()
   FIND_PACKAGE(SalomeParaView)
   SALOME_LOG_OPTIONAL_PACKAGE(ParaView SALOME_USE_PVVIEWER)
 ELSE()
index 4363516baadca4e751d2f483b8e86c93bd6517c4..08c01ebc7cdd2b59dd99a57a6f92b09957b2bcd1 100644 (file)
 # Author: Adrien Bruneton
 #
 
-# Graphviz detection for salome
+# ParaView detection for salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
 
+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)
-#MARK_AS_ADVANCED()
 
 INCLUDE(${PARAVIEW_USE_FILE})
index a89fc81a80216f985bd78f093bdca1fac13c3507..f0cad8caee771c34091c028c267fe59f2812596f 100644 (file)
@@ -30,4 +30,6 @@ IF(QT4_FOUND)
   SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
   SALOME_ACCUMULATE_ENVIRONMENT(PATH ${QT_QMAKE_EXECUTABLE})
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${QT_QTCORE_LIBRARY})
+  SET(QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
+  MESSAGE(STATUS "Qt version is ${QT_VERSION}")
 ENDIF()
index 04fc9f7fa89a85ddc833f7dc469e6c79861acb49..27884f1298f75888215f802a19ce526fdefb4790 100644 (file)
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
 
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Core    Qt5Core_INCLUDE_DIRS    1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Gui     Qt5Gui_INCLUDE_DIRS     1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Widgets Qt5Widgets_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Network Qt5Network_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Xml     Qt5Xml_INCLUDE_DIRS     1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5OpenGL  Qt5OpenGL_INCLUDE_DIRS  1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5PrintSupport Qt5PrintSupport_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5WebKit Qt5WebKit_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Core          Qt5Core_INCLUDE_DIRS          1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Gui           Qt5Gui_INCLUDE_DIRS           1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Widgets       Qt5Widgets_INCLUDE_DIRS       1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Network       Qt5Network_INCLUDE_DIRS       1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Xml           Qt5Xml_INCLUDE_DIRS           1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5OpenGL        Qt5OpenGL_INCLUDE_DIRS        1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5PrintSupport  Qt5PrintSupport_INCLUDE_DIRS  1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5WebKit        Qt5WebKit_INCLUDE_DIRS        1 ENVVAR QT5_ROOT_DIR)
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5WebKitWidgets Qt5WebKitWidgets_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5X11Extras Qt5X11Extras_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5X11Extras     Qt5X11Extras_INCLUDE_DIRS     1 ENVVAR QT5_ROOT_DIR)
 
 get_filename_component(LINGUIST_PATH ${Qt5Core_DIR} DIRECTORY)
 get_filename_component(LINGUIST_PATH ${LINGUIST_PATH} DIRECTORY)
@@ -61,8 +61,10 @@ endif(QT_LRELEASE_EXECUTABLE)
 
 #MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE)
 #
-#IF(QT5_FOUND) 
+IF(Qt5Core_FOUND) 
 #  SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
 #  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${QT_QMAKE_EXECUTABLE})
 #  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${QT_QTCORE_LIBRARY})
-#ENDIF()
+  SET(QT_VERSION "${Qt5Core_VERSION}")
+  MESSAGE(STATUS "Qt version is ${QT_VERSION}")
+ENDIF()