]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
rnc :
authorgdd <gdd>
Tue, 13 Sep 2011 15:08:53 +0000 (15:08 +0000)
committergdd <gdd>
Tue, 13 Sep 2011 15:08:53 +0000 (15:08 +0000)
- added a .m4 macro to detect OpenCV library
- added CHECK_OPENCV in configure.ac
- removed all hard coded paths from Makefile.am files

configure.ac
src/LightApp/Makefile.am
src/OCCViewer/Makefile.am
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/SOCC/Makefile.am

index b475a8b5887fd1aadcf0352423794de431444418..300aa728eaede752d45e22381e93cd83650d9655 100644 (file)
@@ -371,6 +371,15 @@ echo
 
 CHECK_QWT
 
+echo
+echo ---------------------------------------------
+echo Testing OpenCV
+echo ---------------------------------------------
+echo
+
+CHECK_OPENCV
+
+
 CHECK_TESTRECORDER
 
 echo
@@ -526,10 +535,10 @@ fi
 
 if test "$GUI_DISABLE_CORBA" != "yes"; then
 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok
-omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok libxml_ok Kernel_ok"
+omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok opencv_ok libxml_ok Kernel_ok"
 else
 variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok boost_ok
-occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
+occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok "
 fi
 
 for var in $variables
index 1b327b2054eb3886741971b64b08d279450bd661..4ffc98a3fa57d29fb9f6d4d65e1ffd2e4f805fe3 100755 (executable)
@@ -181,13 +181,13 @@ nodist_salomeres_DATA =           \
 
 libLightApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS)            \
        $(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD       \
+       $(OPENCV_INCLUDES)                                                              \
        -I$(srcdir)/../CAM -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LogWindow           \
        -I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style \
-       -I$(srcdir)/../CASCatch                                                         \
-       -I/home/palmco/OpenCV/OpenCV-2.3.0/install/include/opencv \
-       -I/home/palmco/OpenCV/OpenCV-2.3.0/install/include
+       -I$(srcdir)/../CASCatch
+
 libLightApp_la_LDFLAGS = $(QT_MT_LIBS)                                                 \
-       -L/home/palmco/OpenCV/OpenCV-2.3.0/install/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann 
+       $(OPENCV_LIBS)
 
 if ENABLE_VTKVIEWER
   libLightApp_la_CPPFLAGS += $(VTK_INCLUDES) -I$(srcdir)/../VTKViewer
index beaa3834cacc0fd0c76a8214ffde3663cac2e914..f7352630d2ed8e978b41ef7d1a1a01860312e34b 100755 (executable)
@@ -127,12 +127,12 @@ nodist_salomeres_DATA =           \
        OCCViewer_msg_fr.qm 
 
 libOCCViewer_la_CPPFLAGS = $(QT_INCLUDES) $(OGL_INCLUDES) $(CAS_CPPFLAGS) @KERNEL_CXXFLAGS@ \
-       -I$(srcdir)/../SUIT -I$(srcdir)/../ViewerTools -I$(srcdir)/../Qtx \
-       -I$(srcdir)/../OpenGLUtils -I$(srcdir)/../CASCatch              \
-       -I/home/palmco/OpenCV/OpenCV-2.3.0/install/include/opencv \
-       -I/home/palmco/OpenCV/OpenCV-2.3.0/install/include
+       $(OPENCV_INCLUDES)                                                      \
+       -I$(srcdir)/../SUIT -I$(srcdir)/../ViewerTools -I$(srcdir)/../Qtx       \
+       -I$(srcdir)/../OpenGLUtils -I$(srcdir)/../CASCatch
 
 libOCCViewer_la_LDFLAGS  = $(OGL_LIBS) $(QT_MT_LIBS) $(CAS_KERNEL) $(CAS_VIEWER) \
-       -L/home/palmco/OpenCV/OpenCV-2.3.0/install/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann  
+       $(OPENCV_LIBS)
+
 libOCCViewer_la_LIBADD   = ../Qtx/libqtx.la ../SUIT/libsuit.la \
        ../ViewerTools/libViewerTools.la ../OpenGLUtils/libOpenGLUtils.la
index f6ebec16f1755c81a54e417f9d08bc0ce2a931c1..7a8ef22ecc73f1254241d2ce69e324edbaf1dba1 100755 (executable)
@@ -309,37 +309,6 @@ void OCCViewer_ViewPort3d::setBackgroundImage( const QString& fileName,const Asp
   //TEST
 //   if ( !activeView().IsNull() ) {
 //     activeView()->SetBackgroundImage( (Standard_CString)fileName.toLatin1().constData(),theFillMethod,true);
-    
-//     //TEST
-//     SUIT_ViewWindow*       theViewWindow    = getDesktop()->activeWindow();
-//   OCCViewer_Viewer*      anOCCViewer      = ( (OCCViewer_ViewManager*)( theViewWindow->getViewManager() ) )->getOCCViewer();
-//   QString                theImgFileName   = backgroundImageFilename();
-//   Handle(AIS_InteractiveContext) aContext = anOCCViewer->getAISContext(); 
-//   
-//   gp_Pnt p1(0,0,0);
-//   gp_Pnt p2(0,100,0);
-//   gp_Pnt p3(100,100,0);
-//   gp_Pnt p4(100,0,0);
-//   
-//   BRepBuilderAPI_MakePolygon Wire(p1,p2,p3,p4, Standard_True); 
-//   BRepBuilderAPI_MakeFace Face(Wire,Standard_True);
-//   const TopoDS_Shape& S = Face.Shape();
-//   Handle(AIS_TexturedShape) anAIS = new AIS_TexturedShape(S);
-//   if (!theImgFileName.isEmpty())
-//   {
-//     MESSAGE("filename is not empty")
-//     anAIS->SetTextureFileName(TCollection_AsciiString(theImgFileName.toStdString().c_str()));
-//     anAIS->SetTextureMapOn();
-//     activeView()->SetSurfaceDetail(V3d_TEX_ALL);
-// //     anAIS->SetDisplayMode(AIS_Shaded); 
-//   }
-//   else
-//     anAIS->SetTextureMapOff();
-//   //creation of the presentable object
-//   aContext->SetDisplayMode(anAIS,3);
-//   aContext->SetMaterial(anAIS,Graphic3d_NOM_SATIN);
-//   aContext->Display(anAIS);
-//   aContext->UpdateCurrentViewer();
 //   }
 }
 
index 91ea8e7359973296a3cf44a1c33f7f0f10e6cda0..6f9ba3e5d7061f3a995ec991929469084059346c 100755 (executable)
@@ -46,9 +46,12 @@ MOC_FILES =                  \
 nodist_libSOCC_la_SOURCES = $(MOC_FILES)
 
 libSOCC_la_CPPFLAGS = $(QT_INCLUDES) $(CAS_CPPFLAGS) $(BOOST_CPPFLAGS)                 \
+                     $(OPENCV_INCLUDES)                                                \
                      -I$(srcdir)/../SUIT -I$(srcdir)/../OBJECT -I$(srcdir)/../Prs      \
                      -I$(srcdir)/../OCCViewer -I$(srcdir)/../Qtx
 
-libSOCC_la_LDFLAGS  = $(QT_MT_LIBS)
+libSOCC_la_LDFLAGS  = $(QT_MT_LIBS)    \
+                     $(OPENCV_LIBS)
+
 libSOCC_la_LIBADD   = ../Qtx/libqtx.la ../SUIT/libsuit.la ../OBJECT/libSalomeObject.la \
                      ../Prs/libSalomePrs.la ../OCCViewer/libOCCViewer.la