Skip to content
Snippets Groups Projects
Commit 7b8bec7a authored by Brad King's avatar Brad King
Browse files

Merge branch 'vs-win10-sdk' into release

parents 6506dcaa d7e863c1
No related branches found
No related tags found
No related merge requests found
......@@ -8,4 +8,5 @@ specification of a target Windows version to select a corresponding SDK.
The :variable:`CMAKE_SYSTEM_VERSION` variable may be set to specify a
version. Otherwise CMake computes a default version based on the Windows
SDK versions available. The chosen Windows target version number is provided
in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``.
in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``. If no Windows 10 SDK
is available this value will be empty.
......@@ -115,7 +115,7 @@ bool cmGlobalVisualStudio14Generator::InitializeWindows(cmMakefile* mf)
{
if (cmHasLiteralPrefix(this->SystemVersion, "10.0"))
{
return this->SelectWindows10SDK(mf);
return this->SelectWindows10SDK(mf, false);
}
return true;
}
......@@ -143,17 +143,18 @@ bool cmGlobalVisualStudio14Generator::InitializeWindowsStore(cmMakefile* mf)
}
if (cmHasLiteralPrefix(this->SystemVersion, "10.0"))
{
return this->SelectWindows10SDK(mf);
return this->SelectWindows10SDK(mf, true);
}
return true;
}
//----------------------------------------------------------------------------
bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf)
bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf,
bool required)
{
// Find the default version of the Windows 10 SDK.
this->WindowsTargetPlatformVersion = this->GetWindows10SDKVersion();
if (this->WindowsTargetPlatformVersion.empty())
if (required && this->WindowsTargetPlatformVersion.empty())
{
std::ostringstream e;
e << "Could not find an appropriate version of the Windows 10 SDK"
......
......@@ -39,7 +39,7 @@ protected:
bool IsWindowsStoreToolsetInstalled() const;
virtual const char* GetIDEVersion() { return "14.0"; }
virtual bool SelectWindows10SDK(cmMakefile* mf);
virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
// Used to verify that the Desktop toolset for the current generator is
// installed on the machine.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment