ProGen now automatically excludes all .rc files from static builds

This commit is contained in:
Guenter Obiltschnig
2012-11-10 11:35:46 +01:00
parent eb8c662c4c
commit c07d577048

View File

@@ -1,7 +1,7 @@
// //
// ProGen.cpp // ProGen.cpp
// //
// $Id: //poco/1.4/ProGen/src/ProGen.cpp#5 $ // $Id: //poco/1.4/ProGen/src/ProGen.cpp#6 $
// //
// Visual Studio project file generator. // Visual Studio project file generator.
// //
@@ -263,6 +263,7 @@ protected:
{ {
Poco::XML::Element* pFileElem = static_cast<Poco::XML::Element*>(pFileElems->item(fileIndex)); Poco::XML::Element* pFileElem = static_cast<Poco::XML::Element*>(pFileElems->item(fileIndex));
Poco::XML::Element* pFileConfigElem = pFileElem->getChildElement("FileConfiguration"); Poco::XML::Element* pFileConfigElem = pFileElem->getChildElement("FileConfiguration");
Poco::Path relativePath = pFileElem->getAttribute("RelativePath");
if (pFileConfigElem) if (pFileConfigElem)
{ {
Poco::AutoPtr<Poco::XML::Element> pPrototypeFileConfigElem = static_cast<Poco::XML::Element*>(pFileConfigElem->cloneNode(true)); Poco::AutoPtr<Poco::XML::Element> pPrototypeFileConfigElem = static_cast<Poco::XML::Element*>(pFileConfigElem->cloneNode(true));
@@ -276,6 +277,10 @@ protected:
{ {
Poco::AutoPtr<Poco::XML::Element> pNewFileConfigElem = static_cast<Poco::XML::Element*>(pPrototypeFileConfigElem->cloneNode(true)); Poco::AutoPtr<Poco::XML::Element> pNewFileConfigElem = static_cast<Poco::XML::Element*>(pPrototypeFileConfigElem->cloneNode(true));
pNewFileConfigElem->setAttribute("Name", *it + "|" + platform); pNewFileConfigElem->setAttribute("Name", *it + "|" + platform);
if (relativePath.getExtension() == "rc" && it->find("static") != std::string::npos)
{
pNewFileConfigElem->setAttribute("ExcludedFromBuild", "true");
}
pFileElem->appendChild(pNewFileConfigElem); pFileElem->appendChild(pNewFileConfigElem);
} }
} }