py/usermod.cmake: Check target exists in usermod_gather_sources.
Check a target exists before accessing properties. Otherwise usermod_gather_sources would recurse into garbage property names and break. Signed-off-by: Phil Howard <phil@gadgetoid.com>
This commit is contained in:
parent
fa942d532f
commit
525fce7170
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,10 @@ function(usermod_gather_sources SOURCES_VARNAME INCLUDE_DIRECTORIES_VARNAME INCL
|
|||
if (NOT ${LIB} IN_LIST ${INCLUDED_VARNAME})
|
||||
list(APPEND ${INCLUDED_VARNAME} ${LIB})
|
||||
|
||||
if (NOT TARGET ${LIB})
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Gather library sources
|
||||
get_target_property(lib_sources ${LIB} INTERFACE_SOURCES)
|
||||
if (lib_sources)
|
||||
|
|
|
|||
Loading…
Reference in a new issue