fix nonfree module compilation without CUDA
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 7 Feb 2014 09:40:37 +0000 (13:40 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 7 Feb 2014 09:40:37 +0000 (13:40 +0400)
modules/nonfree/src/precomp.hpp

index 2853139..6311ee2 100644 (file)
 #include "opencv2/imgproc/imgproc.hpp"
 #include "opencv2/core/internal.hpp"
 
-#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
-    #include "opencv2/nonfree/gpu.hpp"
+#include "opencv2/nonfree/gpu.hpp"
 
-    #if defined(HAVE_CUDA)
-        #include "opencv2/gpu/stream_accessor.hpp"
-        #include "opencv2/gpu/device/common.hpp"
-
-        static inline void throw_nogpu() { CV_Error(CV_StsNotImplemented, "The called functionality is disabled for current build or platform"); }
-    #else
-        static inline void throw_nogpu() { CV_Error(CV_GpuNotSupported, "The library is compiled without GPU support"); }
-    #endif
+#if defined(HAVE_CUDA) && defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
+    #include "opencv2/gpu/stream_accessor.hpp"
+    #include "opencv2/gpu/device/common.hpp"
+    static inline void throw_nogpu() { CV_Error(CV_StsNotImplemented, "The called functionality is disabled for current build or platform"); }
+#else
+    static inline void throw_nogpu() { CV_Error(CV_GpuNotSupported, "The library is compiled without GPU support"); }
 #endif
 
 #ifdef HAVE_OPENCV_OCL