rnc: made OpenCV an optional prerequisite

This commit is contained in:
gdd 2011-11-07 15:11:09 +00:00
parent 9746242e57
commit 63e2f3bf87
4 changed files with 31 additions and 8 deletions

View File

@ -96,12 +96,14 @@ bool EntityGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
case GEOMOp::OpExplode: // EXPLODE
aDlg = new EntityGUI_SubShapeDlg( getGeometryGUI(), parent );
break;
#ifdef WITH_OPENCV
case GEOMOp::OpFeatureDetect: // FEATURE DETECTION
aDlg = new EntityGUI_FeatureDetectorDlg( getGeometryGUI(), parent );
break;
case GEOMOp::OpPictureImport: // IMPORT PICTURE IN VIEWER
aDlg = new EntityGUI_PictureImportDlg( getGeometryGUI(), parent );
break;
#endif
default:
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
break;

View File

@ -24,6 +24,17 @@
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
if WITH_OPENCV
FeatureDetectorDlg_Header = EntityGUI_FeatureDetectorDlg.h
FeatureDetectorDlg_Sources = EntityGUI_FeatureDetectorDlg.cxx
FeatureDetectorDlg_moc = EntityGUI_FeatureDetectorDlg_moc.cxx
PictureImportDlg_Header = EntityGUI_PictureImportDlg.h
PictureImportDlg_Sources = EntityGUI_PictureImportDlg.cxx
PictureImportDlg_moc = EntityGUI_PictureImportDlg_moc.cxx
Opencv_libs = $(OPENCV_LIBS)
Opencv_Includes = $(OPENCV_INCLUDES)
endif
# Libraries targets
lib_LTLIBRARIES = libEntityGUI.la
@ -34,8 +45,8 @@ salomeinclude_HEADERS = \
EntityGUI_SketcherDlg.h \
EntityGUI_3DSketcherDlg.h \
EntityGUI_SubShapeDlg.h \
EntityGUI_FeatureDetectorDlg.h \
EntityGUI_PictureImportDlg.h
$(FeatureDetectorDlg_Header) \
$(PictureImportDlg_Header)
dist_libEntityGUI_la_SOURCES = \
EntityGUI.cxx \
@ -43,16 +54,16 @@ dist_libEntityGUI_la_SOURCES = \
EntityGUI_SketcherDlg.cxx \
EntityGUI_3DSketcherDlg.cxx \
EntityGUI_SubShapeDlg.cxx \
EntityGUI_FeatureDetectorDlg.cxx\
EntityGUI_PictureImportDlg.cxx
$(FeatureDetectorDlg_Sources) \
$(PictureImportDlg_Sources)
MOC_FILES = \
EntityGUI_Widgets_moc.cxx \
EntityGUI_SketcherDlg_moc.cxx \
EntityGUI_3DSketcherDlg_moc.cxx \
EntityGUI_SubShapeDlg_moc.cxx \
EntityGUI_FeatureDetectorDlg_moc.cxx \
EntityGUI_PictureImportDlg_moc.cxx
$(FeatureDetectorDlg_moc) \
$(PictureImportDlg_moc)
nodist_libEntityGUI_la_SOURCES = \
$(MOC_FILES)
@ -86,7 +97,7 @@ libEntityGUI_la_CPPFLAGS = \
$(GUI_CXXFLAGS) \
$(CORBA_CXXFLAGS) \
$(CORBA_INCLUDES) \
$(OPENCV_INCLUDES) \
$(Opencv_includes) \
-I$(srcdir)/../GEOMGUI \
-I$(srcdir)/../DlgRef \
-I$(srcdir)/../GEOMBase \
@ -106,4 +117,4 @@ libEntityGUI_la_LDFLAGS = \
../GEOMGUI/libGEOM.la \
$(QT_MT_LIBS) \
$(CAS_TKTopAlgo) -lTKernel \
$(OPENCV_LIBS)
$(Opencv_libs)

View File

@ -461,8 +461,10 @@ void GeometryGUI::OnGUIEvent( int id )
case GEOMOp::Op2dSketcher: // MENU ENTITY - SKETCHER
case GEOMOp::Op3dSketcher: // MENU ENTITY - 3D SKETCHER
case GEOMOp::OpExplode: // MENU ENTITY - EXPLODE
#ifdef WITH_OPENCV
case GEOMOp::OpFeatureDetect: // MENU ENTITY - FEATURE DETECTION
case GEOMOp::OpPictureImport: // MENU ENTITY - IMPORT PICTURE IN VIEWER
#endif
libName = "EntityGUI";
break;
case GEOMOp::OpEdge: // MENU BUILD - EDGE
@ -710,8 +712,10 @@ void GeometryGUI::initialize( CAM_Application* app )
createGeomAction( GEOMOp::Op2dSketcher, "SKETCH" );
createGeomAction( GEOMOp::Op3dSketcher, "3DSKETCH" );
createGeomAction( GEOMOp::OpExplode, "EXPLODE" );
#ifdef WITH_OPENCV
createGeomAction( GEOMOp::OpFeatureDetect,"FEATURE_DETECTION" );
createGeomAction( GEOMOp::OpPictureImport,"PICTURE_IMPORT" );
#endif
createGeomAction( GEOMOp::OpEdge, "EDGE" );
createGeomAction( GEOMOp::OpWire, "WIRE" );
@ -910,8 +914,10 @@ void GeometryGUI::initialize( CAM_Application* app )
createMenu( separator(), newEntId, -1 );
#ifdef WITH_OPENCV
createMenu( GEOMOp::OpFeatureDetect, newEntId, -1 );
createMenu( GEOMOp::OpPictureImport, newEntId, -1 );
#endif
int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 );
@ -1077,9 +1083,11 @@ void GeometryGUI::initialize( CAM_Application* app )
createTool( separator(), operTbId );
createTool( GEOMOp::OpExplode, operTbId );
createTool( separator(), operTbId );
#ifdef WITH_OPENCV
createTool( GEOMOp::OpFeatureDetect, operTbId );
createTool( GEOMOp::OpPictureImport, operTbId );
createTool( separator(), operTbId );
#endif
createTool( GEOMOp::OpPartition, operTbId );
createTool( GEOMOp::OpArchimede, operTbId );
createTool( GEOMOp::OpShapesOnShape, operTbId );

View File

@ -94,8 +94,10 @@ namespace GEOMOp {
Op2dSketcher = 3300, // MENU NEW ENTITY - SKETCHER
Op3dSketcher = 3301, // MENU NEW ENTITY - 3D SKETCHER
OpExplode = 3302, // MENU NEW ENTITY - EXPLODE
#ifdef WITH_OPENCV
OpFeatureDetect = 3303, // MENU NEW ENTITY - FEATURE DETECTION
OpPictureImport = 3304, // MENU NEW ENTITY - IMPORT PICTURE IN VIEWER
#endif
// BuildGUI ------------------//--------------------------------
OpEdge = 3400, // MENU NEW ENTITY - BUILD - EDGE
OpWire = 3401, // MENU NEW ENTITY - BUILD - WIRE