[cgma-dev] r4068 - in cgm/trunk: . geom/OCC

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Jul 22 13:42:42 CDT 2010


Author: kraftche
Date: 2010-07-22 13:42:42 -0500 (Thu, 22 Jul 2010)
New Revision: 4068

Modified:
   cgm/trunk/configure.ac
   cgm/trunk/geom/OCC/Makefile.am
   cgm/trunk/geom/OCC/OCCQueryEngine.cpp
Log:
o Detect whether or not OCC library is build with IGES/STEP and build accordingly
o Put OCC library list in proper reverse-depends order
o Fix handling of invalid file type in OCCQueryEngine


Modified: cgm/trunk/configure.ac
===================================================================
--- cgm/trunk/configure.ac	2010-07-22 15:21:57 UTC (rev 4067)
+++ cgm/trunk/configure.ac	2010-07-22 18:42:42 UTC (rev 4068)
@@ -304,7 +304,10 @@
 CUBIT_OCC_LIB=
 HAVE_OCC_DEF=
 if test "x$occ_DIR" != "xno"; then
-  OCC_LIBS="-lTKMath -lTKXSBase -lTKernel -lTKShHealing -lTKBRep -lTKG3d -lTKBO -lTKFeat -lTKFillet -lTKG2d -lTKOffset -lTKBool -lTKGeomAlgo -lTKGeomBase -lTKPrim -lTKTopAlgo -lTKHLR -lTKIGES -lTKMesh -lTKPrim -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKSTEP -lTKSTL -lTKTopAlgo -lTKXSBase -lTKLCAF -lTKBinL"
+  OCC_CORE_LIBS="-lTKMesh -lTKTopAlgo -lTKGeomAlgo -lTKBRep -lTKGeomBase -lTKG3d -lTKG2d -lTKMath -lTKernel"
+  OCC_GEOM_LIBS="-lTKHLR -lTKOffset -lTKShHealing -lTKFillet -lTKFeat -lTKBool -lTKBO -lTKPrim"
+  OCC_LCAF_LIBS="-lTKLCAF -lTKBinL"
+  OCC_LIBS="$OCC_LCAF_LIBS $OCC_GEOM_LIBS $OCC_CORE_LIBS"
   CUBIT_OCC_LIB="-lcubit_OCC"
 
   # Set OCC_INC_FLAG and OCC_LIB_FLAG based on --with-occ option
@@ -390,12 +393,28 @@
                                [AC_MSG_ERROR([OpenCascade config error: libTKernel not found ])],
                                [-ldl] )
                 ] )
+
+  HAVE_OCC_DEF="-DHAVE_OCC"
+  # Check for IGES, STEP, and STL support
+  AC_CHECK_LIB( [TKIGES], [igesread], 
+                [HAVE_OCC_DEF="$HAVE_OCC_DEF -DHAVE_OCC_IGES"
+                 OCC_LIBS="-lTKIGES -lTKXSBase $OCC_LIBS"], 
+                [], [$OCC_LIBS] )
+  AC_CHECK_LIB( [TKSTEP], [main], 
+                [HAVE_OCC_DEF="$HAVE_OCC_DEF -DHAVE_OCC_STEP"
+                 OCC_LIBS="-lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKXSBase $OCC_LIBS"], 
+                [], [$OCC_LIBS] )
+  AC_CHECK_LIB( [TKSTL], [main], 
+                [HAVE_OCC_DEF="$HAVE_OCC_DEF -DHAVE_OCC_STL"
+                 OCC_LIBS="-lTKSTL $OCC_LIBS"], 
+                [], [$OCC_LIBS] )
+         
+                
   AC_LANG_POP(C++)
 
   # Restore original values of variables
   CPPFLAGS="$old_CPPFLAGS"
   LDFLAGS="$old_LDFLAGS"
-  HAVE_OCC_DEF="-DHAVE_OCC"
   
   # Append to CGM global values
   CGM_EXT_LIBS="$CGM_EXT_LIBS $OCC_LIBS"

Modified: cgm/trunk/geom/OCC/Makefile.am
===================================================================
--- cgm/trunk/geom/OCC/Makefile.am	2010-07-22 15:21:57 UTC (rev 4067)
+++ cgm/trunk/geom/OCC/Makefile.am	2010-07-22 18:42:42 UTC (rev 4068)


More information about the cgma-dev mailing list