add_subdirectory: Run subdirectory install rules in correct order
Before this change, install rules created by add_subdirectory() would be executed after all of the top-level install rules, even if they were declared before the top-level rules. This change interleaves them with the rules so that they all get run in the correct order.
Fixes #18414 (closed).
Edited by Kyle Edwards