export(TARGETS)
Previously, only `export()` calls in the same directory were noticed. Also add a test that exports in a different directory than the target itself resides in. Fixes: #25813