]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
1) Rename SALOME_GEOM_USE_GUI -> SALOME_BUILD_GUI
authoreap <eap@opencascade.com>
Wed, 11 Sep 2013 14:21:14 +0000 (14:21 +0000)
committereap <eap@opencascade.com>
Wed, 11 Sep 2013 14:21:14 +0000 (14:21 +0000)
2) Fix detection of OpenCV and building of correspondent sources
3) Fix generation of Sphinx doc's in "build environment"(LD_LIBRARY_PATH not filled)

CMakeLists.txt
adm_local/cmake_files/FindSalomeOpenCV.cmake
adm_local/cmake_files/SalomeGEOMConfig.cmake.in
doc/docutils/CMakeLists.txt
src/CMakeLists.txt
src/EntityGUI/CMakeLists.txt
src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx

index ce07ae11320bb3b3704fd91bfbe647002a983e00..95f7c507eb73a484f3b97b63c2a5300099eef7da 100755 (executable)
@@ -64,10 +64,10 @@ OPTION(SALOME_BUILD_DOC   "Generate SALOME GEOM documentation" ${SALOME_BUILD_DO
 OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ${SALOME_BUILD_TESTS})
 
 # Advanced options:
-OPTION(SALOME_GEOM_USE_GUI    "Enable GUI" ON)
+OPTION(SALOME_BUILD_GUI       "Enable GUI" ON)
 OPTION(SALOME_GEOM_USE_OPENCV "Enable shape recognition from picture" ON)
 
-MARK_AS_ADVANCED(SALOME_GEOM_USE_GUI SALOME_GEOM_USE_OPENCV)
+MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_GEOM_USE_OPENCV)
 
 # Prerequisites
 # =============
@@ -87,15 +87,12 @@ FIND_PACKAGE(SalomeBoost REQUIRED)
 FIND_PACKAGE(SalomeOmniORB REQUIRED)
 FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
 #FIND_PACKAGE(SalomeLibXml2 REQUIRED)
-#FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
+FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C)
 
 # Other KERNEL optionals:
-# IF(SALOME_USE_MPI)
-#   FIND_PACKAGE(SalomeMPI REQUIRED)
-#   IF(HDF5_IS_PARALLEL)
-#     SALOME_ADD_MPI_TO_HDF5()
-#   ENDIF()  
-# ENDIF()
+IF(SALOME_USE_MPI)
+  FIND_PACKAGE(SalomeMPI) # needed for doc generation by Sphinx
+ENDIF()  
 IF(SALOME_BUILD_TESTS)
   ENABLE_TESTING()
   FIND_PACKAGE(SalomeCppUnit)
@@ -111,7 +108,7 @@ IF(SALOME_BUILD_DOC)
 ENDIF()
 
 # Find GUI (optional)
-IF(SALOME_GEOM_USE_GUI)
+IF(SALOME_BUILD_GUI)
   SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
   IF(EXISTS ${GUI_ROOT_DIR})
     LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
@@ -119,13 +116,13 @@ IF(SALOME_GEOM_USE_GUI)
   ELSE(EXISTS ${GUI_ROOT_DIR})
     MESSAGE(STATUS "GUI_ROOT_DIR is not well defined, GEOM will be built without GUI!!!")
   ENDIF(EXISTS ${GUI_ROOT_DIR})
-  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(SalomeGUI SALOME_GEOM_USE_GUI)
-ENDIF(SALOME_GEOM_USE_GUI)
+  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(SalomeGUI SALOME_BUILD_GUI)
+ENDIF(SALOME_BUILD_GUI)
 
 ##
 ## Prerequisites From GUI:
 ##
-IF(SALOME_GEOM_USE_GUI)
+IF(SALOME_BUILD_GUI)
   
   # Qt4
   FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
@@ -141,7 +138,7 @@ IF(SALOME_GEOM_USE_GUI)
     SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(VTK SALOME_USE_VTKVIEWER)
   ENDIF()
 
-ENDIF(SALOME_GEOM_USE_GUI)
+ENDIF(SALOME_BUILD_GUI)
 
 ##
 ## GEOM specifics
@@ -149,11 +146,13 @@ ENDIF(SALOME_GEOM_USE_GUI)
 
 FIND_PACKAGE(SalomeCAS REQUIRED)
 
-IF(SALOME_GEOM_USE_GUI)
+IF(SALOME_BUILD_GUI)
   # OpenCV
-  FIND_PACKAGE(OpenCV)
-ENDIF(SALOME_GEOM_USE_GUI)
-SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(OPENCV SALOME_GEOM_USE_OPENCV)
+  FIND_PACKAGE(SalomeOpenCV)
+  SALOME_UPDATE_FLAG_AND_LOG_PACKAGE(OpenCV SALOME_GEOM_USE_OPENCV)
+ELSE()
+  SET(SALOME_GEOM_USE_OPENCV OFF)
+ENDIF(SALOME_BUILD_GUI)
 
 # Detection summary:
 SALOME_PACKAGE_REPORT()
@@ -226,13 +225,13 @@ SET(_${PROJECT_NAME}_exposed_targets
   GEOMUtils GEOMEngine GEOM_SupervEngine IGESExport IGESImport NMTDS NMTTools GEOMSketcher
   SalomeIDLGEOM STEPExport STEPImport STLExport ShHealOper
 )
-IF(SALOME_GEOM_USE_GUI)
+IF(SALOME_BUILD_GUI)
   LIST(APPEND _${PROJECT_NAME}_exposed_targets 
     AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef EntityGUI GEOMBase
     GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject
     OCC2VTK VTKExport OperationGUI PrimitiveGUI RepairGUI TransformationGUI
     )
-ENDIF(SALOME_GEOM_USE_GUI)
+ENDIF(SALOME_BUILD_GUI)
 
 IF(SALOME_GEOM_USE_OPENCV)
   LIST(APPEND _${PROJECT_NAME}_exposed_targets 
@@ -250,6 +249,7 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 #      Ensure the variables are always defined for the configure:
 SET(CAS_ROOT_DIR "${CAS_ROOT_DIR}")
 SET(OPENCV_ROOT_DIR "${OPENCV_ROOT_DIR}")
+SET(GUI_ROOT_DIR "$GUI_ROOT_DIR}")
 
 SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
 CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in 
index f0c9e4439b56cf3633c0d800d79af1210b63bff1..6f31b756da67d789337759e0a632d963da766bd0 100644 (file)
@@ -19,9 +19,9 @@
 # Author: Adrien Bruneton
 #
 
-# OpenGL detection dor Salome
+# OpenCV detection dor Salome
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_DIR)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCV OpenCV_DIR 2)
 #MARK_AS_ADVANCED()
index 9d7abb1db620b914ed5ecb833e503d2472da1a03..3bb29129698cd44b2fa80af2505705649d5994ae 100644 (file)
@@ -51,7 +51,7 @@ SET(SALOME_BUILD_DOC    @SALOME_BUILD_DOC@)
 SET(SALOME_BUILD_TESTS  @SALOME_BUILD_TESTS@)
 
 # Advanced options
-SET(SALOME_GEOM_USE_GUI    @SALOME_GEOM_USE_GUI@)
+SET(SALOME_BUILD_GUI       @SALOME_BUILD_GUI@)
 SET(SALOME_GEOM_USE_OPENCV @SALOME_GEOM_USE_OPENCV@)
 
 # Level 1 prerequisites:
@@ -59,7 +59,7 @@ SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
 SET_AND_CHECK(CAS_ROOT_DIR_EXP "@PACKAGE_CAS_ROOT_DIR@")
 
 # Optional level 1 prerequisites:
-IF(SALOME_GEOM_USE_GUI)
+IF(SALOME_BUILD_GUI)
   SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
 ENDIF()
 IF(SALOME_GEOM_USE_OPENCV)
index 92b6159f30e986b8ed9d0a4185fe0fc73dfbaa31..1d4b70c6409bdffe2a3881cd5533c22c8224ea59 100755 (executable)
@@ -49,6 +49,16 @@ IF(WINDOWS)
   STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
   @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
   @SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
+  @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\${SALOME_INSTALL_PYTHON}\;%PYTHONPATH%
+  @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\${SALOME_INSTALL_PYTHON_SHARED}\;%PYTHONPATH%
+  @SET PYTHONPATH=${HDF5_ROOT_DIR}\\lib\;%PYTHONPATH%
+  @SET PYTHONPATH=${MPI_ROOT_DIR}\\lib\;%PYTHONPATH%
+
+  @SET PYTHONPATH=${KERNEL_ROOT_DIR}\\bin\\salome\;%PYTHONPATH%
+  @SET PATH=${KERNEL_ROOT_DIR}\\lib\\salome\;%PATH%
+  @SET PYTHONPATH=${KERNEL_ROOT_DIR}\\${SALOME_INSTALL_PYTHON}\;%PYTHONPATH%
+  @SET PYTHONPATH=${KERNEL_ROOT_DIR}\\${SALOME_INSTALL_PYTHON_SHARED}\;%PYTHONPATH%
+
   @SET PYTHONPATH=${OMNIORB_ROOT_DIR}\\lib\\x86_win32\;%PYTHONPATH%
   @SET PYTHONPATH=${OMNIORB_ROOT_DIR}\\lib\\python\;%PYTHONPATH%
   @SET PATH=${OMNIORB_ROOT_DIR}\\lib\\x86_win32\;%PATH%
@@ -59,6 +69,16 @@ ELSE(WINDOWS)
   SET(SCR  " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
   export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
   export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
+  export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}:\${PYTHONPATH}
+  export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED}:\${PYTHONPATH}
+  export PYTHONPATH=${HDF5_ROOT_DIR}/lib:\${PYTHONPATH}
+  export PYTHONPATH=${MPI_ROOT_DIR}/lib:\${PYTHONPATH}
+
+  export PYTHONPATH=${KERNEL_ROOT_DIR}/bin/salome:\${PYTHONPATH}
+  export LD_LIBRARY_PATH=${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+  export PYTHONPATH=${KERNEL_ROOT_DIR}/${SALOME_INSTALL_PYTHON}:\${PYTHONPATH}
+  export PYTHONPATH=${KERNEL_ROOT_DIR}/${SALOME_INSTALL_PYTHON_SHARED}:\${PYTHONPATH}
+
   export PYTHONPATH=${OMNIORB_ROOT_DIR}/lib:\${PYTHONPATH}
   export PYTHONPATH=${OMNIORB_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}
   export PYTHONPATH=${OMNIORBPY_ROOT_DIR}/lib:\${PYTHONPATH}
@@ -66,7 +86,8 @@ ELSE(WINDOWS)
   export LD_LIBRARY_PATH=${OMNIORB_ROOT_DIR}/lib:\${LD_LIBRARY_PATH}
   export PYTHONPATH=${SETUPTOOLS_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}
   export PYTHONPATH=${DOCUTILS_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}
-  export PYTHONPATH=${SPHINX_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}"
+  export PYTHONPATH=${SPHINX_ROOT_DIR}/lib/${_pydir}/site-packages:\${PYTHONPATH}
+"
   )
   SET(EXT "sh")
   SET(CALL_STR ".")
index 17904ee59360446f731ee1b22a491bb3b6712b93..5aabf4894d9b24cb51993cb0f8503316c66ac17a 100755 (executable)
@@ -21,8 +21,8 @@
 # Common packages
 ##
 SET(SUBDIRS_COMMON
-  ARCHIMEDE NMTDS NMTTools BlockFix GEOMAlgo SKETCHER OCC2VTK GEOM BREPExport
-  BREPImport IGESExport IGESImport STEPExport STEPImport STLExport VTKExport
+  ARCHIMEDE NMTDS NMTTools BlockFix GEOMAlgo SKETCHER GEOM BREPExport
+  BREPImport IGESExport IGESImport STEPExport STEPImport STLExport
   ShHealOper GEOMUtils GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
   )
 
@@ -38,10 +38,10 @@ ENDIF()
 ##
 # GUI
 ##
-IF(SALOME_GEOM_USE_GUI)
+IF(SALOME_BUILD_GUI)
   SET(SUBDIRS_GUI
-    OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI GEOMBase
-    GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
+    OBJECT OCC2VTK VTKExport DlgRef GEOMFiltersSelection Material GEOMGUI
+    GEOMBase GEOMToolsGUI DisplayGUI BasicGUI PrimitiveGUI GenerationGUI
     EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI
     RepairGUI MeasureGUI GroupGUI BlocksGUI AdvancedGUI AdvancedEngine
     GEOM_SWIG_WITHIHM
index 7bccc4ff9af7f8a1e718372471bd266a6451b3cd..1e32b65b94177905c317e0b3063fbd4aeffe288d 100755 (executable)
@@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/GEOMGUI
   ${PROJECT_SOURCE_DIR}/src/GEOMBase
   ${PROJECT_SOURCE_DIR}/src/SKETCHER
+  ${PROJECT_SOURCE_DIR}/src/ShapeRecognition
   ${PROJECT_SOURCE_DIR}/src/DlgRef
   ${PROJECT_BINARY_DIR}/src/DlgRef
   ${CMAKE_CURRENT_SOURCE_DIR}
@@ -64,7 +65,7 @@ SET(_link_LIBRARIES
 
 # optional sources
 IF(SALOME_GEOM_USE_OPENCV)
-  SET( FeatureDetectorDlg_Sources FeatureDetectorDlg.cxx )
+  SET( FeatureDetectorDlg_Sources EntityGUI_FeatureDetectorDlg.cxx )
   SET( FeatureDetectorDlg_moc_h   EntityGUI_FeatureDetectorDlg.h )
 ENDIF()
 
index a6ad98775e168b1dd6dc0a317337068107bf764d..a9a5d2ce38af48bc6b46eae249bfacdafdd05767 100644 (file)
@@ -37,7 +37,6 @@
 #include <GeometryGUI.h>
 #include <EntityGUI.h>
 #include <GEOMBase.h>
-#include <GEOM_Object.hxx>
 
 #include <SUIT_Desktop.h>
 #include <SUIT_ResourceMgr.h>