]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Migration to OCCT 7.0
authormpa <mpa@opencascade.com>
Wed, 24 Feb 2016 13:37:09 +0000 (16:37 +0300)
committervsr <vsr@opencascade.com>
Wed, 25 May 2016 14:30:09 +0000 (17:30 +0300)
salome_adm/cmake_files/FindCAS.cmake
salome_adm/cmake_files/FindSalomeCAS.cmake [changed mode: 0644->0755]
salome_adm/cmake_files/SalomeMacros.cmake
src/Basics/Basics_OCCTVersion.hxx

index 4a1bdee115aa3e3642eb3ef872e62ca3313699c4..ce24f3d589e15e7fdadd2b047cb8c1f24f0f1335 100644 (file)
 #
 
 IF(NOT CAS_FIND_QUIETLY)
-    MESSAGE(STATUS "Looking for OpenCascade (CAS) ...")
+    MESSAGE(STATUS "Looking for Open CASCADE Technology ...")
 ENDIF()
 
 SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx)
 
 # Include directories:
-FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES inc)
-FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES inc)
+FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade)
+FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade)
+IF(CAS_INCLUDE_DIRS)
+  SET(CAS_UPCOUNT 2)
+ELSE()
+  FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc)
+  FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc)
+ENDIF()
 MARK_AS_ADVANCED(CAS_VERSION_FILE)
 
 SET(CAS_VERSION_DEVELOPMENT 0)
@@ -61,8 +67,6 @@ IF(NOT WIN32)
  SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H")
 ENDIF()
 
-SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DOCC_CONVERT_SIGNALS")
-
 # Test for 64 bit machine:
 IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)
   SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64")
@@ -76,65 +80,65 @@ IF(NOT WIN32)
   ENDIF()
 ENDIF()
 
-FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin )
-FIND_LIBRARY(CAS_TKBin TKBin )
-FIND_LIBRARY(CAS_TKBinL TKBinL )
-FIND_LIBRARY(CAS_TKBinTObj TKBinTObj )
-FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF )
-FIND_LIBRARY(CAS_TKBO TKBO )
-FIND_LIBRARY(CAS_TKBool TKBool )
-FIND_LIBRARY(CAS_TKBRep TKBRep )
-FIND_LIBRARY(CAS_TKCAF TKCAF )
-FIND_LIBRARY(CAS_TKCDF TKCDF )
-FIND_LIBRARY(CAS_TKernel TKernel )
-FIND_LIBRARY(CAS_TKFeat TKFeat )
-FIND_LIBRARY(CAS_TKFillet TKFillet )
-FIND_LIBRARY(CAS_TKG2d TKG2d )
-FIND_LIBRARY(CAS_TKG3d TKG3d )
-FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo )
-FIND_LIBRARY(CAS_TKGeomBase TKGeomBase )
-FIND_LIBRARY(CAS_TKHLR TKHLR )
-FIND_LIBRARY(CAS_TKIGES TKIGES )
-FIND_LIBRARY(CAS_TKLCAF TKLCAF )
-FIND_LIBRARY(CAS_TKMath TKMath )
-FIND_LIBRARY(CAS_TKMesh TKMesh )
-FIND_LIBRARY(CAS_TKMeshVS TKMeshVS )
+FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBin TKBin PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBinL TKBinL PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBinTObj TKBinTObj PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBO TKBO PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBool TKBool PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKBRep TKBRep PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKCAF TKCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKCDF TKCDF PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKernel TKernel PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKFeat TKFeat PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKFillet TKFillet PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKG2d TKG2d PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKG3d TKG3d PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKGeomBase TKGeomBase PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKHLR TKHLR PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKIGES TKIGES PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKLCAF TKLCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKMath TKMath PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKMesh TKMesh PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKMeshVS TKMeshVS PATH_SUFFIXES lib lin64/gcc/lib bin)
 IF(CAS_VERSION_STR VERSION_LESS "6.9.1")
-  FIND_LIBRARY(CAS_TKNIS TKNIS )
+  FIND_LIBRARY(CAS_TKNIS TKNIS PATH_SUFFIXES lib lin64/gcc/lib bin)
 ENDIF()
-FIND_LIBRARY(CAS_TKOffset TKOffset )
-FIND_LIBRARY(CAS_TKOpenGl TKOpenGl )
-FIND_LIBRARY(CAS_TKPrim TKPrim )
-FIND_LIBRARY(CAS_TKService TKService )
-FIND_LIBRARY(CAS_TKShHealing TKShHealing )
-FIND_LIBRARY(CAS_TKSTEP TKSTEP )
-FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 )
-FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr )
-FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase )
-FIND_LIBRARY(CAS_TKSTL TKSTL )
-FIND_LIBRARY(CAS_TKTObj TKTObj )
-FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo )
-FIND_LIBRARY(CAS_TKV3d TKV3d )
-FIND_LIBRARY(CAS_TKVRML TKVRML )
-FIND_LIBRARY(CAS_TKXCAF TKXCAF )
-FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES )
-FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP )
-FIND_LIBRARY(CAS_TKXMesh TKXMesh )
-FIND_LIBRARY(CAS_TKXml TKXml )
-FIND_LIBRARY(CAS_TKXmlL TKXmlL )
-FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj )
-FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF )
-FIND_LIBRARY(CAS_TKXSBase TKXSBase )
+FIND_LIBRARY(CAS_TKOffset TKOffset PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKOpenGl TKOpenGl PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKPrim TKPrim PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKService TKService PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKShHealing TKShHealing PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKSTEP TKSTEP PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKSTL TKSTL PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKTObj TKTObj PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKV3d TKV3d PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKVRML TKVRML PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXCAF TKXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXMesh TKXMesh PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXml TKXml PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXmlL TKXmlL PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+FIND_LIBRARY(CAS_TKXSBase TKXSBase PATH_SUFFIXES lib lin64/gcc/lib bin)
 
 IF(CAS_VERSION_STR VERSION_LESS "7.0")
-  FIND_LIBRARY(CAS_PTKernel PTKernel )
-  FIND_LIBRARY(CAS_TKPCAF TKPCAF )
-  FIND_LIBRARY(CAS_TKPLCAF TKPLCAF )
-  FIND_LIBRARY(CAS_TKPShape TKPShape )
-  FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema )
-  FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema )
-  FIND_LIBRARY(CAS_TKStdSchema TKStdSchema )
-  FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema )
+  FIND_LIBRARY(CAS_PTKernel PTKernel PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKPCAF TKPCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKPLCAF TKPLCAF PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKPShape TKPShape PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKStdSchema TKStdSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
+  FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema PATH_SUFFIXES lib lin64/gcc/lib bin)
 ENDIF()
 
 SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath})
old mode 100644 (file)
new mode 100755 (executable)
index 2bdfb8b..186df6c
@@ -38,12 +38,12 @@ MARK_AS_ADVANCED(CAS_INCLUDE_DIRS
   CAS_TKXmlXCAF   CAS_TKXSBase    CAS_XCAFPlugin    CAS_XmlLPlugin    CAS_XmlPlugin   CAS_XmlTObjPlugin   
   CAS_XmlXCAFPlugin CAS_Xmu)
 
-IF(CAS_StdLPlugin)
-  SET(CAS_STDPLUGIN StdPlugin)
+
+IF(CAS_VERSION_STR VERSION_LESS "7.0")
+  SET(CAS_STDPLUGIN TKStdSchema)
 ELSE()
-  IF(CAS_TKStdSchema)
-    SET(CAS_STDPLUGIN TKStdSchema)
-  ENDIF()
+  SET(CAS_STDPLUGIN TKStd)
+  SET(CAS_BINPLUGIN TKBin)\r
 ENDIF()
 
 IF(CAS_FOUND)
index f78ffe4ac1c29134793b733015d5b61dc6f4b781..2581731420f9d8092bfd2715bda386be8949f0ea 100644 (file)
@@ -563,8 +563,13 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
        #  Note the double de-reference of "referenceVariable":
        SET(_tmp_ROOT_DIR "${${referenceVariable}}")
     ENDIF()
-    IF(${upCount}) 
-      FOREACH(_unused RANGE 1 ${upCount})        
+    # Up cound can be reset by detection procedure
+    SET(_upCount ${upCount})
+    IF(DEFINED ${pkg_UC}_UPCOUNT)
+      SET(_upCount ${${pkg_UC}_UPCOUNT})
+    ENDIF()
+    IF(${_upCount}) 
+      FOREACH(_unused RANGE 1 ${_upCount})        
         GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
       ENDFOREACH()
     ENDIF()
index ce73b22fa38275fe92d45006e7cdc23455cacbd6..e7ca523c8dca981fd333b4a963e359fde2b4c5b4 100644 (file)
@@ -28,6 +28,8 @@
 
 #include <Standard_Version.hxx>
 
+#include <Standard_DefineHandle.hxx>
+
 //
 // NOTE: Since version 6.7.0 OCC_VERSION_DEVELOPMENT macro in the Standard_Version.hxx
 // points to the development status of the OCCT version: for example "dev", "alpha",
 #  endif
 #endif
 
+// temporary code for backward compatibility with OCCT
+#if OCC_VERSION_MAJOR < 7
+  #define OCCT_DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTI(C1)
+  #define OCCT_IMPLEMENT_STANDARD_RTTIEXT(C1,C2) \
+          IMPLEMENT_STANDARD_HANDLE(C1,C2) \
+          IMPLEMENT_STANDARD_RTTIEXT(C1,C2)
+#else
+  #define OCCT_DEFINE_STANDARD_RTTIEXT(C1,C2) DEFINE_STANDARD_RTTIEXT(C1,C2)
+  #define OCCT_IMPLEMENT_STANDARD_RTTIEXT(C1,C2) IMPLEMENT_STANDARD_RTTIEXT(C1,C2)
+#endif
+
 #endif // BASICS_OCCTVERSION_HXX