Teach install(DIRECTORY) to support generator expressions in the list of directories, much like install(FILES) already supports.