Added variable expansion.
This commit is contained in:
parent
2a7fc5750b
commit
b6121bf8a8
|
@ -51,9 +51,21 @@ bool cmSourceFilesCommand::InitialPass(std::vector<std::string>& args)
|
||||||
for(std::vector<std::string>::iterator i = (args.begin() + 1);
|
for(std::vector<std::string>::iterator i = (args.begin() + 1);
|
||||||
i != args.end(); ++i)
|
i != args.end(); ++i)
|
||||||
{
|
{
|
||||||
|
std::string copy = *i;
|
||||||
|
m_Makefile->ExpandVariablesInString(copy);
|
||||||
cmSourceFile file;
|
cmSourceFile file;
|
||||||
file.SetIsAnAbstractClass(false);
|
file.SetIsAnAbstractClass(false);
|
||||||
file.SetName((*i).c_str(), m_Makefile->GetCurrentDirectory());
|
std::string path = cmSystemTools::GetFilenamePath(copy);
|
||||||
|
if (path == "")
|
||||||
|
{
|
||||||
|
file.SetName(cmSystemTools::GetFilenameName(copy.c_str()).c_str(),
|
||||||
|
m_Makefile->GetCurrentDirectory());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
file.SetName(cmSystemTools::GetFilenameName(copy.c_str()).c_str(),
|
||||||
|
path.c_str());
|
||||||
|
}
|
||||||
m_Makefile->AddSource(file, args[0].c_str());
|
m_Makefile->AddSource(file, args[0].c_str());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue