diff --git a/src_cpp/core.hpp b/src_cpp/core.hpp index ebb6f5d3e..3a5be24a2 100644 --- a/src_cpp/core.hpp +++ b/src_cpp/core.hpp @@ -1,15 +1,11 @@ #include "ocvrs_common.hpp" #include -#ifdef HAVE_OPENCL - #include - // opengl.hpp, va_intel.hpp and directx.hpp unconditionally include ocl.hpp thus it needs to be within ifdef HAVE_OPENCL - #ifdef HAVE_OPENGL - #include - #endif - #include - #include -#endif +#include +#include +#include #include +#include +#include #if (CV_VERSION_MAJOR == 3 && CV_VERSION_MINOR == 4 && CV_VERSION_REVISION >= 4) /* 3.4.4+ */ \ || (CV_VERSION_MAJOR == 4) /* 4.0+ */ \ || (CV_VERSION_MAJOR == 5) /* 5.0+ */ diff --git a/src_cpp/ocvrs_common.hpp b/src_cpp/ocvrs_common.hpp index c99f4ae87..fc47e45fe 100644 --- a/src_cpp/ocvrs_common.hpp +++ b/src_cpp/ocvrs_common.hpp @@ -1,11 +1,10 @@ #ifndef __OCVRS_COMMON_HPP__ #define __OCVRS_COMMON_HPP__ -#include -#include -// defining HAVE_VA starts to rely on for VADisplay and VASurfaceID instead of OpenCV stubs, and we stop generating -// bindings for the functions that use them -#undef HAVE_VA +#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__) \ + || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) + #define OCVRS_TARGET_OS_WINDOWS +#endif #define CV_COLLECT_IMPL_DATA #ifdef OCVRS_PARSING_HEADERS @@ -16,13 +15,9 @@ #define OCVRS_FFI_EXPORT_SUFFIX #endif +#include #include -#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__) \ - || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) - #define OCVRS_TARGET_OS_WINDOWS -#endif - #define OCVRS_ONLY_DEPENDENT_TYPES #define OCVRS_HANDLE(code, msg, return_name) Err(code, msg, return_name)