One can iterate over the SOURCES
for each target. I would recommend explicit target enumeration, but you can iterate through the SUBDIRECTORIES
directory property for the top-level directory to read BUILDSYSTEM_TARGETS
for each directory instead.