mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Only add platform toolset, target platform version and IPP setting properties to configuration property groups in the VS exporter
This commit is contained in:
parent
86bdcbae15
commit
dbd48a755c
1 changed files with 26 additions and 45 deletions
|
|
@ -81,42 +81,6 @@ public:
|
|||
: "The default value for this exporter is " + getDefaultWindowsTargetPlatformVersion()));
|
||||
}
|
||||
|
||||
void addPlatformToolsetToPropertyGroup (XmlElement& p) const
|
||||
{
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
e->createNewChildElement ("PlatformToolset")->addTextElement (getPlatformToolset());
|
||||
}
|
||||
|
||||
void addWindowsTargetPlatformVersionToPropertyGroup (XmlElement& p) const
|
||||
{
|
||||
auto target = getWindowsTargetPlatformVersion();
|
||||
|
||||
if (target == "Latest")
|
||||
{
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
{
|
||||
auto* child = e->createNewChildElement ("WindowsTargetPlatformVersion");
|
||||
|
||||
child->setAttribute ("Condition", "'$(WindowsTargetPlatformVersion)' == ''");
|
||||
child->addTextElement ("$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
e->createNewChildElement ("WindowsTargetPlatformVersion")->addTextElement (target);
|
||||
}
|
||||
}
|
||||
|
||||
void addIPPSettingToPropertyGroup (XmlElement& p) const
|
||||
{
|
||||
auto ippLibrary = getIPPLibrary();
|
||||
|
||||
if (ippLibrary.isNotEmpty())
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
e->createNewChildElement ("UseIntelIPP")->addTextElement (ippLibrary);
|
||||
}
|
||||
|
||||
void create (const OwnedArray<LibraryModule>&) const override
|
||||
{
|
||||
createResourcesAndIcon();
|
||||
|
|
@ -451,6 +415,15 @@ public:
|
|||
|
||||
if (config.shouldLinkIncremental())
|
||||
e->createNewChildElement ("LinkIncremental")->addTextElement ("true");
|
||||
|
||||
e->createNewChildElement ("PlatformToolset")->addTextElement (owner.getPlatformToolset());
|
||||
|
||||
addWindowsTargetPlatformToConfig (*e);
|
||||
|
||||
auto ippLibrary = owner.getIPPLibrary();
|
||||
|
||||
if (ippLibrary.isNotEmpty())
|
||||
e->createNewChildElement ("UseIntelIPP")->addTextElement (ippLibrary);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -472,11 +445,6 @@ public:
|
|||
p->setAttribute ("Label", "LocalAppDataPlatform");
|
||||
}
|
||||
|
||||
{
|
||||
auto* e = projectXml.createNewChildElement ("PropertyGroup");
|
||||
e->setAttribute ("Label", "UserMacros");
|
||||
}
|
||||
|
||||
{
|
||||
auto* props = projectXml.createNewChildElement ("PropertyGroup");
|
||||
props->createNewChildElement ("_ProjectFileVersion")->addTextElement ("10.0.30319.1");
|
||||
|
|
@ -747,10 +715,6 @@ public:
|
|||
auto* e = projectXml.createNewChildElement ("ImportGroup");
|
||||
e->setAttribute ("Label", "ExtensionTargets");
|
||||
}
|
||||
|
||||
getOwner().addPlatformToolsetToPropertyGroup (projectXml);
|
||||
getOwner().addWindowsTargetPlatformVersionToPropertyGroup (projectXml);
|
||||
getOwner().addIPPSettingToPropertyGroup (projectXml);
|
||||
}
|
||||
|
||||
String getProjectType() const
|
||||
|
|
@ -1316,6 +1280,23 @@ public:
|
|||
|
||||
String createRebasedPath (const RelativePath& path) const { return getOwner().createRebasedPath (path); }
|
||||
|
||||
void addWindowsTargetPlatformToConfig (XmlElement& e) const
|
||||
{
|
||||
auto target = owner.getWindowsTargetPlatformVersion();
|
||||
|
||||
if (target == "Latest")
|
||||
{
|
||||
auto* child = e.createNewChildElement ("WindowsTargetPlatformVersion");
|
||||
|
||||
child->setAttribute ("Condition", "'$(WindowsTargetPlatformVersion)' == ''");
|
||||
child->addTextElement ("$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))");
|
||||
}
|
||||
else
|
||||
{
|
||||
e.createNewChildElement ("WindowsTargetPlatformVersion")->addTextElement (target);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
const MSVCProjectExporterBase& owner;
|
||||
String projectGuid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue