Add directory property to list imported targets

Model the change after commit cbca65826c (Add directory property to list
buildsystem targets, 2016-09-19, v3.7.0-rc1~79^2~1).

Fixes: #22291
8 files changed