diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-01 18:09:08 (GMT) |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-01 18:09:08 (GMT) |
commit | 63cb6c7407539ff67292a384a38c5ab9bbf107a4 (patch) | |
tree | d331d0dc551722ed46151f0d83fae4b9da9c03cf /Source/cmAddLibraryCommand.cxx | |
parent | 10ae8a4e249548ab3a2ea223d9bbc4dee1107a9d (diff) | |
download | CMake-63cb6c7407539ff67292a384a38c5ab9bbf107a4.zip CMake-63cb6c7407539ff67292a384a38c5ab9bbf107a4.tar.gz CMake-63cb6c7407539ff67292a384a38c5ab9bbf107a4.tar.bz2 |
Expand vars in exe and lib name
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index cf3d68e..879d7b5 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -49,12 +49,16 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args) this->SetError("called with incorrect number of arguments"); return false; } - + // Library type defaults to value of BUILD_SHARED_LIBS, if it exists, // otherwise it defaults to static library. 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 @@ -81,8 +85,8 @@ 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; } |