Extended RegenerateSourceListGlobs to look at all the relevant paths for a given target instead of just CMAKE_CURRENT_SOURCE_DIR and added comments.