macOS: Allow IMPORTED_LOCATION to be a framework folder

Issue: #24946
10 files changed