]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Change Python detection procedure in accordance with the changes done in V7_dev branc... ngo/test
authorvsr <vsr@opencascade.com>
Tue, 16 Feb 2016 11:10:30 +0000 (14:10 +0300)
committerNathalie GORE <ng13417n@dsp0657862.postes.calibre.edf.fr>
Fri, 15 Apr 2016 12:58:43 +0000 (14:58 +0200)
Conflicts:
CMakeLists.txt

CMakeLists.txt

index 0393c0617d6fdb1a178b746a1d5a80d9c2dc2055..cbbb5a659ee5d11b756e6d97a8f812e4c11f6c7d 100644 (file)
@@ -90,10 +90,16 @@ OPTION(SALOME_BUILD_TESTS "Build HYDRO tests" ON)
 ## From KERNEL:
 ##
 
-# Mandatory products
-FIND_PACKAGE(SalomePython    REQUIRED)
+# Mandatory products:
+
+FIND_PACKAGE(SalomePythonInterp REQUIRED)
+FIND_PACKAGE(SalomePythonLibs REQUIRED)
+FIND_PACKAGE(SalomeCAS     REQUIRED)
+FIND_PACKAGE(SalomeVTK     REQUIRED)
+FIND_PACKAGE(SalomeOmniORB REQUIRED)
 
 # Optional products:
+
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
   FIND_PACKAGE(SalomeCppUnit)
@@ -111,25 +117,31 @@ IF(SALOME_BUILD_DOC)
   SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
 ENDIF()
 
-# Find optional GUI libraries
-IF(SALOME_BUILD_GUI)
-  # Qt4
-  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
-ENDIF(SALOME_BUILD_GUI)
-
 ##
-## HYDRO specifics
+## From GUI:
 ##
 
-FIND_PACKAGE(SalomeCAS REQUIRED)
-
-FIND_PACKAGE(SalomeVTK REQUIRED)
-
 FIND_PACKAGE(SalomeSIP REQUIRED)  # should come after Python and before PyQt4
 
-FIND_PACKAGE(SalomePyQt4 REQUIRED)
+# Qt
+IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL QtNetwork QtTest)
+  SET(QT_ROOT_DIR "${QT4_ROOT_DIR}")
+  SALOME_CONFIGURE_PREPARE(HYDROData HYDROGUI HYDROPy Qt4 PyQt4)
+ELSE()
+  FIND_PACKAGE(SalomeQt5 REQUIRED)
+  SET(QT_ROOT_DIR "${QT5_ROOT_DIR}")
+  SALOME_CONFIGURE_PREPARE(HYDROData HYDROGUI HYDROPy Qt5 PyQt5)
+ENDIF()
 
-FIND_PACKAGE(SalomeOmniORB REQUIRED)
+# PyQt
+IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+  FIND_PACKAGE(SalomePyQt4 REQUIRED)
+  SET(PYQT_ROOT_DIR "${PYQT4_ROOT_DIR}")
+ELSE()
+  FIND_PACKAGE(SalomePyQt5 REQUIRED)
+  SET(PYQT_ROOT_DIR "${PYQT5_ROOT_DIR}")
+ENDIF()
 
 # Detection summary:
 SALOME_PACKAGE_REPORT_AND_CHECK()
@@ -173,11 +185,10 @@ MARK_AS_ADVANCED(
 # Sources 
 # ========
 ADD_SUBDIRECTORY (src/shapelib)
+ADD_SUBDIRECTORY (src/HYDRO_tests)
 ADD_SUBDIRECTORY (src/HYDROData)
 ADD_SUBDIRECTORY (src/HYDROGUI)
 ADD_SUBDIRECTORY (src/HYDROPy)
-ADD_SUBDIRECTORY (src/HYDROTools)
-ADD_SUBDIRECTORY (src/HYDRO_tests)
 IF(SALOME_BUILD_DOC)
   ADD_SUBDIRECTORY(doc)
 ENDIF()