From: eap Date: Wed, 11 Sep 2013 14:21:14 +0000 (+0000) Subject: 1) Rename SALOME_GEOM_USE_GUI -> SALOME_BUILD_GUI X-Git-Tag: BR_hydro_v_0_3_1~135 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ad606e26245ae0c53280f3b60ae80f4bd87a802;p=modules%2Fgeom.git 1) Rename SALOME_GEOM_USE_GUI -> SALOME_BUILD_GUI 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) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ce07ae113..95f7c507e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/adm_local/cmake_files/FindSalomeOpenCV.cmake b/adm_local/cmake_files/FindSalomeOpenCV.cmake index f0c9e4439..6f31b756d 100644 --- a/adm_local/cmake_files/FindSalomeOpenCV.cmake +++ b/adm_local/cmake_files/FindSalomeOpenCV.cmake @@ -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() diff --git a/adm_local/cmake_files/SalomeGEOMConfig.cmake.in b/adm_local/cmake_files/SalomeGEOMConfig.cmake.in index 9d7abb1db..3bb291296 100644 --- a/adm_local/cmake_files/SalomeGEOMConfig.cmake.in +++ b/adm_local/cmake_files/SalomeGEOMConfig.cmake.in @@ -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) diff --git a/doc/docutils/CMakeLists.txt b/doc/docutils/CMakeLists.txt index 92b6159f3..1d4b70c64 100755 --- a/doc/docutils/CMakeLists.txt +++ b/doc/docutils/CMakeLists.txt @@ -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 ".") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 17904ee59..5aabf4894 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 diff --git a/src/EntityGUI/CMakeLists.txt b/src/EntityGUI/CMakeLists.txt index 7bccc4ff9..1e32b65b9 100755 --- a/src/EntityGUI/CMakeLists.txt +++ b/src/EntityGUI/CMakeLists.txt @@ -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() diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index a6ad98775..a9a5d2ce3 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include