diff options
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 6952338..e802066 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1349,9 +1349,15 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, } fout << " "; } - if(this->Makefile->GetDefinition("CMAKE_STANDARD_LIBRARIES")) + + // Add standard libraries for this language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += linkLanguage; + standardLibsVar += "_STANDARD_LIBRARIES"; + if(const char* stdLibs = + this->Makefile->GetDefinition(standardLibsVar.c_str())) { - fout << this->Makefile->GetDefinition("CMAKE_STANDARD_LIBRARIES") << " "; + fout << stdLibs << " "; } } |