File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -916,11 +916,18 @@ function(_library_search_process lib search_paths_var search_suffixes_var return
916916 endif ()
917917
918918 # Although we got the match, let us search for the required header within the folder
919- file (GLOB_RECURSE lib_header_path "${matched_lib_path} /${lib} .h*" )
920- if (NOT lib_header_path)
921- set ("${return_var} " "${lib} -NOTFOUND" PARENT_SCOPE)
922- return ()
923- endif ()
919+ file (STRINGS "${matched_lib_path} /library.properties" incl_list REGEX "^includes=.*" )
920+ string (REGEX MATCH "^includes=(.*)" incl_list "${arch_str} " )
921+ string (REPLACE "," ";" incl_list "${CMAKE_MATCH_1} " )
922+
923+ foreach (h ${incl_list} )
924+ file (GLOB_RECURSE lib_header_path "${matched_lib_path} /${h} .h*" )
925+ if (NOT lib_header_path)
926+ message (STATUS "Header ${h} for ${lib} is not found." )
927+ set ("${return_var} " "${lib} -NOTFOUND" PARENT_SCOPE)
928+ return ()
929+ endif ()
930+ endforeach ()
924931
925932 set ("${return_var} " "${matched_lib_path} " PARENT_SCOPE)
926933
You can’t perform that action at this time.
0 commit comments