mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
Makefiles: Escape SONAME on linker command line
If the shared object name contains spaces, they need to be properly escaped, or link command will fail.
This commit is contained in:
committed by
Brad King
parent
5025b56843
commit
9dfa7981d5
@@ -780,9 +780,12 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
|
||||
vars.Target = target.c_str();
|
||||
vars.LinkLibraries = linkLibs.c_str();
|
||||
vars.ObjectsQuoted = buildObjs.c_str();
|
||||
std::string targetOutSOName;
|
||||
if (this->GeneratorTarget->HasSOName(this->GetConfigName())) {
|
||||
vars.SONameFlag = this->Makefile->GetSONameFlag(linkLanguage);
|
||||
vars.TargetSOName = this->TargetNames.SharedObject.c_str();
|
||||
targetOutSOName = this->LocalGenerator->ConvertToOutputFormat(
|
||||
this->TargetNames.SharedObject.c_str(), cmOutputConverter::SHELL);
|
||||
vars.TargetSOName = targetOutSOName.c_str();
|
||||
}
|
||||
vars.LinkFlags = linkFlags.c_str();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user