There are a number of ways you can do this. If you really want to do it with a function in the prerequisites list then you can use secondary expansion:
.SECONDEXPANSION:
$(TARGETS): %.o: $$(call RELEVANT,%)
@echo $^
I'm not quite sure how you're compiling multiple .cpp
files into a single object file, though.