mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Don't set the windows target platform version in the .jucer file if it isn't specified
This commit is contained in:
parent
e1c181425b
commit
0e04fbf1cd
1 changed files with 13 additions and 9 deletions
|
|
@ -84,12 +84,9 @@ public:
|
|||
|
||||
void addWindowsTargetPlatformProperties (PropertyListBuilder& props)
|
||||
{
|
||||
if (getWindowsTargetPlatformVersionValue() == Value())
|
||||
getWindowsTargetPlatformVersionValue() = getDefaultWindowsTargetPlatformVersion();
|
||||
|
||||
auto isWindows10SDK = getVisualStudioVersion() > 14;
|
||||
|
||||
props.add (new TextPropertyComponent (getWindowsTargetPlatformVersionValue(), "Windows Target Platform", 20, false),
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (windowsTargetPlatformVersion, "Windows Target Platform", 20),
|
||||
String ("Specifies the version of the Windows SDK that will be used when building this project. ")
|
||||
+ (isWindows10SDK ? "You can see which SDKs you have installed on your machine by going to \"Program Files (x86)\\Windows Kits\\10\\Lib\". " : "")
|
||||
+ "The default value for this exporter is " + getDefaultWindowsTargetPlatformVersion());
|
||||
|
|
@ -103,11 +100,8 @@ public:
|
|||
|
||||
void addWindowsTargetPlatformVersionToPropertyGroup (XmlElement& p) const
|
||||
{
|
||||
const String& targetVersion = getWindowsTargetPlatformVersion();
|
||||
|
||||
if (targetVersion.isNotEmpty())
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
e->createNewChildElement ("WindowsTargetPlatformVersion")->addTextElement (getWindowsTargetPlatformVersion());
|
||||
forEachXmlChildElementWithTagName (p, e, "PropertyGroup")
|
||||
e->createNewChildElement ("WindowsTargetPlatformVersion")->addTextElement (getWindowsTargetPlatformVersion());
|
||||
}
|
||||
|
||||
void addIPPSettingToPropertyGroup (XmlElement& p) const
|
||||
|
|
@ -151,6 +145,12 @@ public:
|
|||
TargetOS::windows)));
|
||||
}
|
||||
|
||||
void initialiseWindowsTargetPlatformVersion()
|
||||
{
|
||||
windowsTargetPlatformVersion.referTo (settings, Ids::windowsTargetPlatformVersion,
|
||||
nullptr, getDefaultWindowsTargetPlatformVersion());
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
class MSVCBuildConfiguration : public BuildConfiguration
|
||||
{
|
||||
|
|
@ -1443,6 +1443,7 @@ protected:
|
|||
//==============================================================================
|
||||
mutable File rcFile, iconFile;
|
||||
OwnedArray<MSVCTargetBase> targets;
|
||||
CachedValue<String> windowsTargetPlatformVersion;
|
||||
|
||||
File getProjectFile (const String& extension, const String& target) const
|
||||
{
|
||||
|
|
@ -1839,6 +1840,7 @@ public:
|
|||
: MSVCProjectExporterBase (p, t, "VisualStudio2013")
|
||||
{
|
||||
name = getName();
|
||||
initialiseWindowsTargetPlatformVersion();
|
||||
}
|
||||
|
||||
static const char* getName() { return "Visual Studio 2013"; }
|
||||
|
|
@ -1882,6 +1884,7 @@ public:
|
|||
: MSVCProjectExporterBase (p, t, "VisualStudio2015")
|
||||
{
|
||||
name = getName();
|
||||
initialiseWindowsTargetPlatformVersion();
|
||||
}
|
||||
|
||||
static const char* getName() { return "Visual Studio 2015"; }
|
||||
|
|
@ -1924,6 +1927,7 @@ public:
|
|||
: MSVCProjectExporterBase (p, t, "VisualStudio2017")
|
||||
{
|
||||
name = getName();
|
||||
initialiseWindowsTargetPlatformVersion();
|
||||
}
|
||||
|
||||
static const char* getName() { return "Visual Studio 2017"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue