From: vsr Date: Tue, 16 Feb 2016 11:10:30 +0000 (+0300) Subject: Change Python detection procedure in accordance with the changes done in V7_dev branc... X-Git-Tag: v1.6~114 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fngo%2Ftest;p=modules%2Fhydro.git Change Python detection procedure in accordance with the changes done in V7_dev branch of SALOME Conflicts: CMakeLists.txt --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0393c061..cbbb5a65 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()