From: gdd Date: Tue, 13 Sep 2011 15:08:53 +0000 (+0000) Subject: rnc : X-Git-Tag: OpenCV_demo1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ec9a9ab4e2cc37cdabf812a02316274f7fba441;p=modules%2Fgui.git rnc : - added a .m4 macro to detect OpenCV library - added CHECK_OPENCV in configure.ac - removed all hard coded paths from Makefile.am files --- diff --git a/configure.ac b/configure.ac index b475a8b58..300aa728e 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/LightApp/Makefile.am b/src/LightApp/Makefile.am index 1b327b205..4ffc98a3f 100755 --- a/src/LightApp/Makefile.am +++ b/src/LightApp/Makefile.am @@ -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 diff --git a/src/OCCViewer/Makefile.am b/src/OCCViewer/Makefile.am index beaa3834c..f7352630d 100755 --- a/src/OCCViewer/Makefile.am +++ b/src/OCCViewer/Makefile.am @@ -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 diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index f6ebec16f..7a8ef22ec 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -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(); // } } diff --git a/src/SOCC/Makefile.am b/src/SOCC/Makefile.am index 91ea8e735..6f9ba3e5d 100755 --- a/src/SOCC/Makefile.am +++ b/src/SOCC/Makefile.am @@ -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