Skip to content

VS: Do not consider MAP_IMPORTED_CONFIG_<CONFIG> on non-imported targets

Brad King requested to merge brad.king/cmake:vs-fix-config-map into master

Since !669 (merged) we accidentally honor MAP_IMPORTED_CONFIG_<CONFIG> while generating the .sln file entries for normal targets. This causes devenv.com-driven builds to use the mapping incorrectly for normal targets. Check that a target really comes from include_external_msproject before considering the map.

Furthermore, when we do use the map, we should only take the first entry if more than one configuration is specified. Otherwise we end up giving VS a configuration name with a ; in it.

Fixes: #17276 (closed)

Merge request reports