From 1b3e0b27af79ecf94dd3a4127ced83d85bd9c223 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 1 Apr 2021 09:48:50 +0000 Subject: [PATCH] cmake: fix files order in Python bindings - with changes backport from 4.x --- modules/python/bindings/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/python/bindings/CMakeLists.txt b/modules/python/bindings/CMakeLists.txt index 0505f1f03f..442107b135 100644 --- a/modules/python/bindings/CMakeLists.txt +++ b/modules/python/bindings/CMakeLists.txt @@ -26,9 +26,18 @@ foreach(m ${OPENCV_PYTHON_MODULES}) list(APPEND opencv_hdrs "${hdr}") endif() endforeach() + + # both wrapping and C++ implementation + file(GLOB hdr2 ${OPENCV_MODULE_${m}_LOCATION}/misc/python/python_*.hpp) + list(SORT hdr2) + list(APPEND opencv_hdrs ${hdr2}) + list(APPEND opencv_userdef_hdrs ${hdr2}) + file(GLOB hdr ${OPENCV_MODULE_${m}_LOCATION}/misc/python/shadow*.hpp) + list(SORT hdr) list(APPEND opencv_hdrs ${hdr}) file(GLOB userdef_hdrs ${OPENCV_MODULE_${m}_LOCATION}/misc/python/pyopencv*.hpp) + list(SORT userdef_hdrs) list(APPEND opencv_userdef_hdrs ${userdef_hdrs}) endforeach(m)