Reduce dependencies between modules
authorMaksim Shabunin <maksim.shabunin@gmail.com>
Mon, 13 Mar 2017 15:53:52 +0000 (18:53 +0300)
committerMaksim Shabunin <maksim.shabunin@gmail.com>
Wed, 15 Mar 2017 14:58:52 +0000 (17:58 +0300)
modules/features2d/CMakeLists.txt
modules/features2d/test/test_precomp.hpp
modules/highgui/CMakeLists.txt
modules/highgui/src/precomp.hpp
modules/java/pure_test/CMakeLists.txt
modules/objdetect/CMakeLists.txt
modules/objdetect/src/precomp.hpp
modules/stitching/CMakeLists.txt
modules/superres/CMakeLists.txt

index bf7d66e..caae24a 100644 (file)
@@ -1,2 +1,2 @@
 set(the_description "2D Features Framework")
-ocv_define_module(features2d opencv_imgproc opencv_ml opencv_flann OPTIONAL opencv_highgui WRAP java python)
+ocv_define_module(features2d opencv_imgproc opencv_flann OPTIONAL opencv_highgui WRAP java python)
index 893b29b..bce72f7 100644 (file)
@@ -13,7 +13,6 @@
 #include "opencv2/imgproc.hpp"
 #include "opencv2/features2d.hpp"
 #include "opencv2/imgcodecs.hpp"
-#include "opencv2/ml.hpp"
 #include <iostream>
 
 #endif
index b0363c4..bba5b8c 100644 (file)
@@ -1,5 +1,5 @@
 set(the_description "High-level GUI and Media I/O")
-ocv_add_module(highgui opencv_imgproc OPTIONAL opencv_imgcodecs opencv_videoio WRAP python)
+ocv_add_module(highgui opencv_imgproc opencv_imgcodecs OPTIONAL opencv_videoio WRAP python)
 
 # ----------------------------------------------------------------------------
 #  CMake file for highgui. See root CMakeLists.txt
index d9e7ad8..40af37c 100644 (file)
 #include "opencv2/imgproc/imgproc_c.h"
 #include "opencv2/highgui/highgui_c.h"
 
-#ifdef HAVE_OPENCV_IMGCODECS
 #include "opencv2/imgcodecs.hpp"
 #include "opencv2/imgcodecs/imgcodecs_c.h"
-#endif
 
 #include <stdlib.h>
 #include <stdio.h>
index 7d78414..95b7e47 100644 (file)
@@ -1,4 +1,6 @@
-if(NOT ANT_EXECUTABLE)
+if(NOT ANT_EXECUTABLE
+  OR NOT BUILD_opencv_imgcodecs
+  OR NOT BUILD_opencv_calib3d)
   return()
 endif()
 
index d42e9e8..862d564 100644 (file)
@@ -1,2 +1,2 @@
 set(the_description "Object Detection")
-ocv_define_module(objdetect opencv_core opencv_imgproc opencv_ml OPTIONAL opencv_highgui WRAP java python)
+ocv_define_module(objdetect opencv_core opencv_imgproc WRAP java python)
index 97b976b..448d8b1 100644 (file)
 #include "opencv2/objdetect.hpp"
 #include "opencv2/imgproc.hpp"
 
-#include "opencv2/ml.hpp"
-
 #include "opencv2/core/utility.hpp"
 #include "opencv2/core/ocl.hpp"
-
-#include "opencv2/opencv_modules.hpp"
-#ifdef HAVE_OPENCV_HIGHGUI
-#  include "opencv2/highgui.hpp"
-#endif
-
 #include "opencv2/core/private.hpp"
 
 #ifdef HAVE_TEGRA_OPTIMIZATION
index 0e4f39a..2802ab8 100644 (file)
@@ -8,6 +8,6 @@ set(STITCHING_CONTRIB_DEPS "opencv_xfeatures2d")
 if(BUILD_SHARED_LIBS AND BUILD_opencv_world AND OPENCV_WORLD_EXCLUDE_EXTRA_MODULES)
   set(STITCHING_CONTRIB_DEPS "")
 endif()
-ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect
+ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d
                   OPTIONAL opencv_cudaarithm opencv_cudafilters opencv_cudafeatures2d opencv_cudalegacy ${STITCHING_CONTRIB_DEPS}
                   WRAP python)
index 7c3fc14..34c9297 100644 (file)
@@ -3,7 +3,6 @@ if(IOS OR WINRT)
 endif()
 
 set(the_description "Super Resolution")
-ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef -Wshadow)
 ocv_define_module(superres opencv_imgproc opencv_video
                   OPTIONAL opencv_videoio opencv_cudaarithm opencv_cudafilters opencv_cudawarping opencv_cudaimgproc opencv_cudaoptflow opencv_cudacodec
                   WRAP python)