Expand vars in exe and lib name
This commit is contained in:
parent
10ae8a4e24
commit
63cb6c7407
|
@ -51,17 +51,21 @@ bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& args)
|
|||
}
|
||||
|
||||
std::vector<std::string>::const_iterator s = args.begin();
|
||||
|
||||
std::string exename = *s;
|
||||
m_Makefile->ExpandVariablesInString(exename);
|
||||
|
||||
++s;
|
||||
if (*s == "WIN32")
|
||||
{
|
||||
++s;
|
||||
std::vector<std::string> srclists(s, args.end());
|
||||
m_Makefile->AddExecutable(args[0].c_str(),srclists, true);
|
||||
m_Makefile->AddExecutable(exename.c_str(),srclists, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> srclists(s, args.end());
|
||||
m_Makefile->AddExecutable(args[0].c_str(),srclists, false);
|
||||
m_Makefile->AddExecutable(exename.c_str(),srclists, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -55,6 +55,10 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
|
|||
int shared = !cmSystemTools::IsOff(m_Makefile->GetDefinition("BUILD_SHARED_LIBS"));
|
||||
|
||||
std::vector<std::string>::const_iterator s = args.begin();
|
||||
|
||||
std::string libname = *s;
|
||||
m_Makefile->ExpandVariablesInString(libname);
|
||||
|
||||
++s;
|
||||
|
||||
// If the second argument is "SHARED" or "STATIC", then it controls
|
||||
|
@ -82,7 +86,7 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
|
|||
}
|
||||
std::vector<std::string> srclists(s, args.end());
|
||||
|
||||
m_Makefile->AddLibrary(args[0].c_str(), shared, srclists);
|
||||
m_Makefile->AddLibrary(libname.c_str(), shared, srclists);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue