From e026c3447bd030057833234cd7b5102bbf5147fe Mon Sep 17 00:00:00 2001 From: gdd Date: Mon, 7 Nov 2011 14:17:10 +0000 Subject: [PATCH] rnc: made OpenCV an optional prerequisite --- adm_local/unix/config_files/check_OpenCV.m4 | 2 ++ src/OCCViewer/Makefile.am | 19 +++++++++++++------ src/OCCViewer/OCCViewer_ViewWindow.cxx | 6 +++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/adm_local/unix/config_files/check_OpenCV.m4 b/adm_local/unix/config_files/check_OpenCV.m4 index 93cd5a6a1..dd91380e6 100644 --- a/adm_local/unix/config_files/check_OpenCV.m4 +++ b/adm_local/unix/config_files/check_OpenCV.m4 @@ -88,6 +88,8 @@ else AC_MSG_RESULT([for OPENCV: yes]) fi +AM_CONDITIONAL(WITH_OPENCV, [test x"$opencv_ok" = xyes]) + AC_SUBST(OPENCV_INCLUDES) AC_SUBST(OPENCV_LIBS) diff --git a/src/OCCViewer/Makefile.am b/src/OCCViewer/Makefile.am index f7352630d..d064f0a28 100755 --- a/src/OCCViewer/Makefile.am +++ b/src/OCCViewer/Makefile.am @@ -25,6 +25,13 @@ # $Header$ # +if WITH_OPENCV + FeatureDetector_Header = OCCViewer_FeatureDetector.h + FeatureDetector_Sources = OCCViewer_FeatureDetector.cxx + Opencv_libs = $(OPENCV_LIBS) + Opencv_Includes = $(OPENCV_INCLUDES) +endif + include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libOCCViewer.la @@ -48,7 +55,7 @@ salomeinclude_HEADERS = \ OCCViewer_CubeAxesDlg.h \ OCCViewer_ToolTip.h \ OCCViewer_ViewFrame.h \ - OCCViewer_FeatureDetector.h + $(FeatureDetector_Header) dist_libOCCViewer_la_SOURCES = \ OCCViewer_AISSelector.cxx \ @@ -68,7 +75,7 @@ dist_libOCCViewer_la_SOURCES = \ OCCViewer_CubeAxesDlg.cxx \ OCCViewer_ToolTip.cxx \ OCCViewer_ViewFrame.cxx \ - OCCViewer_FeatureDetector.cxx + $(FeatureDetector_Sources) MOC_FILES = \ OCCViewer_AISSelector_moc.cxx \ @@ -127,12 +134,12 @@ nodist_salomeres_DATA = \ OCCViewer_msg_fr.qm libOCCViewer_la_CPPFLAGS = $(QT_INCLUDES) $(OGL_INCLUDES) $(CAS_CPPFLAGS) @KERNEL_CXXFLAGS@ \ - $(OPENCV_INCLUDES) \ - -I$(srcdir)/../SUIT -I$(srcdir)/../ViewerTools -I$(srcdir)/../Qtx \ - -I$(srcdir)/../OpenGLUtils -I$(srcdir)/../CASCatch + -I$(srcdir)/../SUIT -I$(srcdir)/../ViewerTools -I$(srcdir)/../Qtx \ + -I$(srcdir)/../OpenGLUtils -I$(srcdir)/../CASCatch\ + $(Opencv_includes) libOCCViewer_la_LDFLAGS = $(OGL_LIBS) $(QT_MT_LIBS) $(CAS_KERNEL) $(CAS_VIEWER) \ - $(OPENCV_LIBS) + $(Opencv_libs) libOCCViewer_la_LIBADD = ../Qtx/libqtx.la ../SUIT/libsuit.la \ ../ViewerTools/libViewerTools.la ../OpenGLUtils/libOpenGLUtils.la diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 647a755cd..d231d53ca 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -90,9 +90,9 @@ #include "utilities.h" -// OpenCV includes -#include -#include +// // OpenCV includes +// #include +// #include static QEvent* l_mbPressEvent = 0; -- 2.39.2