diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 879d7b5e5..2bc9ab0f7 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -84,7 +84,14 @@ bool cmAddLibraryCommand::InitialPass(std::vector const& args) shared = 2; } } - std::vector srclists(s, args.end()); + + std::vector srclists; + while (s != args.end()) + { + std::string copy = *s; + m_Makefile->ExpandVariablesInString(copy); + srclists.push_back(copy); + } m_Makefile->AddLibrary(libname.c_str(), shared, srclists);