java: use module's public headers only

This commit is contained in:
Alexander Alekhin 2017-06-06 21:10:02 +03:00
parent 0e1d65d3b1
commit 59798b3f7c

View File

@ -149,7 +149,14 @@ foreach(module ${OPENCV_JAVA_MODULES})
file(STRINGS "${custom_header_list}" module_headers)
ocv_list_add_prefix(module_headers "${OPENCV_MODULE_opencv_${module}_LOCATION}/")
else()
set(module_headers "${OPENCV_MODULE_opencv_${module}_HEADERS}")
set(module_headers "")
# TODO Implement module's "_HEADERS_PUBLIC" variable (OpenCVModule.cmake)
foreach(hdr ${OPENCV_MODULE_opencv_${module}_HEADERS})
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
if(NOT hdr2 MATCHES "opencv2/${m}/private.*" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" )
list(APPEND module_headers "${hdr}")
endif()
endforeach()
endif()
if(NOT module_headers)