build: fix cv2.cpp compilation

This commit is contained in:
Alexander Alekhin 2021-01-30 11:32:27 +00:00
parent 6ce9bb6f7a
commit c5bf15e009
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,9 @@
#ifndef OPENCV_UTILS_TLS_HPP #ifndef OPENCV_UTILS_TLS_HPP
#define OPENCV_UTILS_TLS_HPP #define OPENCV_UTILS_TLS_HPP
#include <opencv2/core/utility.hpp> #ifndef OPENCV_CORE_UTILITY_H
#error "tls.hpp must be included after opencv2/core/utility.hpp or opencv2/core.hpp"
#endif
namespace cv { namespace cv {

View File

@ -31,13 +31,14 @@
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/ndarrayobject.h> #include <numpy/ndarrayobject.h>
#include "opencv2/opencv_modules.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utils/configuration.private.hpp" #include "opencv2/core/utils/configuration.private.hpp"
#include "opencv2/core/utils/logger.hpp" #include "opencv2/core/utils/logger.hpp"
#include "opencv2/core/utils/tls.hpp" #include "opencv2/core/utils/tls.hpp"
#include "pyopencv_generated_include.h" #include "pyopencv_generated_include.h"
#include "opencv2/core/types_c.h" #include "opencv2/core/types_c.h"
#include "opencv2/opencv_modules.hpp"
#include "pycompat.hpp" #include "pycompat.hpp"
#include <map> #include <map>