diff options
author | Brad King <brad.king@kitware.com> | 2019-07-12 15:22:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-12 21:29:40 (GMT) |
commit | 22d3eb5d5e4ce9c6371ab709655928552453fbda (patch) | |
tree | ca27b28cfa41f5aa453e390743cfe8e2ec04138b /Source/cmExportBuildFileGenerator.cxx | |
parent | f9e0cf64176628d07871741da2c6f585f52c4e39 (diff) | |
download | CMake-22d3eb5d5e4ce9c6371ab709655928552453fbda.zip CMake-22d3eb5d5e4ce9c6371ab709655928552453fbda.tar.gz CMake-22d3eb5d5e4ce9c6371ab709655928552453fbda.tar.bz2 |
Refactor checks for whether a target has an import library
Use `HasImportLibrary` for such checks.
Diffstat (limited to 'Source/cmExportBuildFileGenerator.cxx')
-rw-r--r-- | Source/cmExportBuildFileGenerator.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 5800629..de3e0e2 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -236,14 +236,15 @@ void cmExportBuildFileGenerator::SetImportLocationProperty( } // Add the import library for windows DLLs. - if (target->HasImportLibrary(config) && - mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) { + if (target->HasImportLibrary(config)) { std::string prop = "IMPORTED_IMPLIB"; prop += suffix; std::string value = target->GetFullPath(config, cmStateEnums::ImportLibraryArtifact); - target->GetImplibGNUtoMS(config, value, value, - "${CMAKE_IMPORT_LIBRARY_SUFFIX}"); + if (mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) { + target->GetImplibGNUtoMS(config, value, value, + "${CMAKE_IMPORT_LIBRARY_SUFFIX}"); + } properties[prop] = value; } } |