Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 01b31b3

Browse files
committed
Fixed header retrieval function
1 parent 719e69c commit 01b31b3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cmake/Platform/Sources/IncludedHeadersRetriever.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,21 @@ function(get_source_headers _source_file _include_dirs _return_var)
4949
foreach (header ${included_headers})
5050

5151
_check_header_existance(${header} ${_include_dirs} header_path)
52-
if ("${header_path}" MATCHES "NOTFOUND")
52+
if (NOT header_path OR "${header_path}" MATCHES "NOTFOUND")
5353
continue()
5454
endif ()
5555

56-
list(APPEND total_included_headers ${header_path})
56+
list(APPEND final_included_headers ${header_path})
5757

5858
if (parsed_args_RECURSIVE)
59-
_get_header_internal_headers(${header_path} ${_include_dirs} recursive_included_headers)
59+
get_source_headers(${header_path} ${_include_dirs} recursive_included_headers RECURSIVE)
60+
list(APPEND final_included_headers ${recursive_included_headers})
6061
endif ()
6162

6263
endforeach ()
6364

64-
list(REMOVE_DUPLICATES total_included_headers)
65+
list(REMOVE_DUPLICATES final_included_headers)
6566

66-
set(${_return_var} ${total_included_headers} PARENT_SCOPE)
67+
set(${_return_var} ${final_included_headers} PARENT_SCOPE)
6768

6869
endfunction()

0 commit comments

Comments
 (0)