mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 05:29:41 +01:00
ProGen now automatically excludes all .rc files from static builds
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user