]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
rnc: made OpenCV an optional prerequisite
authorgdd <gdd>
Mon, 7 Nov 2011 14:17:10 +0000 (14:17 +0000)
committergdd <gdd>
Mon, 7 Nov 2011 14:17:10 +0000 (14:17 +0000)
adm_local/unix/config_files/check_OpenCV.m4
src/OCCViewer/Makefile.am
src/OCCViewer/OCCViewer_ViewWindow.cxx

index 93cd5a6a1024c87973b818f9e369c023a8a0fb94..dd91380e6260336006bea3e5934b48e9e41214f6 100644 (file)
@@ -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)
 
index f7352630d2ed8e978b41ef7d1a1a01860312e34b..d064f0a28d667e6269f72d5f5b59d34079333629 100755 (executable)
 #  $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
index 647a755cd944af9c8c20561083755bc7dc6221e3..d231d53caeb375f6dbdf0b807b6181f9aa912ee1 100755 (executable)
@@ -90,9 +90,9 @@
 
 #include "utilities.h"
 
-// OpenCV includes
-#include <cv.h>
-#include <highgui.h>
+// // OpenCV includes
+// #include <cv.h>
+// #include <highgui.h>
 
 static QEvent* l_mbPressEvent = 0;