cmGeneratorTarget: Make import library checks config-aware

This commit is contained in:
Michael Stürmer
2018-04-04 08:03:29 +02:00
parent 4c1f33961f
commit fb433ff283
9 changed files with 26 additions and 23 deletions

View File

@@ -224,13 +224,14 @@ void cmExportBuildFileGenerator::SetImportLocationProperty(
}
// Add the import library for windows DLLs.
if (target->HasImportLibrary() &&
if (target->HasImportLibrary(config) &&
mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) {
std::string prop = "IMPORTED_IMPLIB";
prop += suffix;
std::string value =
target->GetFullPath(config, cmStateEnums::ImportLibraryArtifact);
target->GetImplibGNUtoMS(value, value, "${CMAKE_IMPORT_LIBRARY_SUFFIX}");
target->GetImplibGNUtoMS(config, value, value,
"${CMAKE_IMPORT_LIBRARY_SUFFIX}");
properties[prop] = value;
}
}