mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
python: filter modules headers (from <module>/include directory)
This commit is contained in:
parent
22576f4dfe
commit
ea5a3e557f
@ -667,6 +667,21 @@ macro(ocv_list_filterout lst regex)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# filter matching elements from the list
|
||||||
|
macro(ocv_list_filter lst regex)
|
||||||
|
set(dst ${ARGN})
|
||||||
|
if(NOT dst)
|
||||||
|
set(dst ${lst})
|
||||||
|
endif()
|
||||||
|
set(__result ${${lst}})
|
||||||
|
foreach(item ${__result})
|
||||||
|
if(NOT item MATCHES "${regex}")
|
||||||
|
list(REMOVE_ITEM __result "${item}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(${dst} ${__result})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
# stable & safe duplicates removal macro
|
# stable & safe duplicates removal macro
|
||||||
macro(ocv_list_unique __lst)
|
macro(ocv_list_unique __lst)
|
||||||
|
@ -20,7 +20,8 @@ endforeach()
|
|||||||
set(opencv_hdrs "")
|
set(opencv_hdrs "")
|
||||||
set(opencv_userdef_hdrs "")
|
set(opencv_userdef_hdrs "")
|
||||||
foreach(m ${OPENCV_PYTHON_MODULES})
|
foreach(m ${OPENCV_PYTHON_MODULES})
|
||||||
list(APPEND opencv_hdrs ${OPENCV_MODULE_${m}_HEADERS})
|
ocv_list_filter(OPENCV_MODULE_${m}_HEADERS "${OPENCV_MODULE_${m}_LOCATION}/include" __hdrs)
|
||||||
|
list(APPEND opencv_hdrs ${__hdrs})
|
||||||
file(GLOB userdef_hdrs ${OPENCV_MODULE_${m}_LOCATION}/misc/python/pyopencv*.hpp)
|
file(GLOB userdef_hdrs ${OPENCV_MODULE_${m}_LOCATION}/misc/python/pyopencv*.hpp)
|
||||||
list(APPEND opencv_userdef_hdrs ${userdef_hdrs})
|
list(APPEND opencv_userdef_hdrs ${userdef_hdrs})
|
||||||
endforeach(m)
|
endforeach(m)
|
||||||
|
Loading…
Reference in New Issue
Block a user