summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-09 21:50:36 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-12 16:39:59 (GMT)
commit8d2e3e53b903b1ee38292b6bcdf3e4eeb5399a05 (patch)
tree295567f1447f996f7fbf7f4c7f2e9196810d475b /Source/cmGeneratorTarget.cxx
parenta143d4ac60da28e12f8b81db39a11226bac8a516 (diff)
downloadCMake-8d2e3e53b903b1ee38292b6bcdf3e4eeb5399a05.zip
CMake-8d2e3e53b903b1ee38292b6bcdf3e4eeb5399a05.tar.gz
CMake-8d2e3e53b903b1ee38292b6bcdf3e4eeb5399a05.tar.bz2
cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c24126f..90acca6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5483,3 +5483,24 @@ cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
}
return "";
}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HasImplibGNUtoMS() const
+{
+ return this->Target->HasImportLibrary()
+ && this->GetPropertyAsBool("GNUtoMS");
+}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::GetImplibGNUtoMS(std::string const& gnuName,
+ std::string& out, const char* newExt) const
+{
+ if(this->HasImplibGNUtoMS() &&
+ gnuName.size() > 6 && gnuName.substr(gnuName.size()-6) == ".dll.a")
+ {
+ out = gnuName.substr(0, gnuName.size()-6);
+ out += newExt? newExt : ".lib";
+ return true;
+ }
+ return false;
+}