Notes |
|
(0040664)
|
Nikolai
|
2016-03-12 11:58
|
|
Also, CMake with the given patch works fine for my purposes. |
|
|
(0040670)
|
Brad King
|
2016-03-14 10:01
|
|
Setting CMAKE_SYSTEM_VERSION is the intended way to configure this value. It must be done either in the toolchain file or with an explicit -DCMAKE_SYSTEM_VERSION= on the first configuration of a build tree. |
|
|
(0040673)
|
Nikolai
|
2016-03-14 10:50
|
|
I doubt it. Tag WindowsTargetPlatformVersion is written to MSVC project file only in one place:
cmVisualStudio10TargetGenerator.cxx 3289
`
cmGlobalVisualStudio10Generator* gg =
static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
...
std::string const& targetPlatformVersion =
gg->GetWindowsTargetPlatformVersion();
if (!targetPlatformVersion.empty())
{
this->WriteString("<WindowsTargetPlatformVersion>", 2);
(*this->BuildFileStream) << cmVS10EscapeXML(targetPlatformVersion) <<
"</WindowsTargetPlatformVersion>\n";
}
`
In cmGlobalVisualStudio10Generator class:
`
std::string const& GetWindowsTargetPlatformVersion() const
{ return this->WindowsTargetPlatformVersion; }
`
The only place WindowsTargetPlatformVersion is assigned to is in cmGlobalVisualStudio14Generator class in function 'bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf, bool required)' where it is searched in register and file system. |
|
|
(0040676)
|
Brad King
|
2016-03-14 10:54
|
|
Yes, and WindowsTargetPlatformVersion is specifically meant to specify the SDK. It needs to specify an existing one or nothing can build. If you specify -DCMAKE_SYSTEM_VERSION= with an exact version of an existing SDK it will be used. |
|
|
(0040678)
|
Nikolai
|
2016-03-14 11:11
|
|
Ok, my fault. Now I have understood the algorithm. It ony works when setting before the first configuration and there is no way to change it afterwards. It differs from the way other properties work and I got confused. |
|
|
(0041229)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|