mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 01:40:14 +01:00
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:
committed by
Damien George
parent
fa942d532f
commit
525fce7170
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user