File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -667,6 +667,21 @@ macro(ocv_list_filterout lst regex)
667
667
endforeach ()
668
668
endmacro ()
669
669
670
+ # filter matching elements from the list
671
+ macro (ocv_list_filter lst regex )
672
+ set (dst ${ARGN} )
673
+ if (NOT dst )
674
+ set (dst ${lst} )
675
+ endif ()
676
+ set (__result ${${lst}} )
677
+ foreach (item ${__result} )
678
+ if (NOT item MATCHES "${regex} " )
679
+ list (REMOVE_ITEM __result "${item} " )
680
+ endif ()
681
+ endforeach ()
682
+ set (${dst} ${__result} )
683
+ endmacro ()
684
+
670
685
671
686
# stable & safe duplicates removal macro
672
687
macro (ocv_list_unique __lst )
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ endforeach()
20
20
set (opencv_hdrs "" )
21
21
set (opencv_userdef_hdrs "" )
22
22
foreach (m ${OPENCV_PYTHON_MODULES} )
23
- list (APPEND opencv_hdrs ${OPENCV_MODULE_${m}_HEADERS} )
23
+ ocv_list_filter (OPENCV_MODULE_${m}_HEADERS "${OPENCV_MODULE_${m} _LOCATION}/include" __hdrs )
24
+ list (APPEND opencv_hdrs ${__hdrs} )
24
25
file (GLOB userdef_hdrs ${OPENCV_MODULE_${m}_LOCATION}/misc/python/pyopencv*.hpp )
25
26
list (APPEND opencv_userdef_hdrs ${userdef_hdrs} )
26
27
endforeach (m )
You can’t perform that action at this time.
0 commit comments