Can't get past generator error for Windows 2015 and Windows Store
I am trying to build opencv for Windows Store using CMake 3.8.2.
C:\opencv-3.2.0\buildUWP2>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat" store
C:\opencv-3.2.0\buildUWP2>CMake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..\sources
I'm stuck on this error
CMake Error at CMakeLists.txt:99 (project):
Visual Studio 14 2015 supports Windows Store '8.0', '8.1' and '10.0', but
not '10'. Check CMAKE_SYSTEM_VERSION.
I've tried many variations of the cmake command including this
CMake -G "Visual Studio 14 2015" -D CMAKE_SYSTEM_NAME:STRING=WindowsStore -D CMAKE_SYSTEM_VERSION:STRING=10.0
But I still get the same error. I took a look at the code for 3.8.2 on GitHub and I think the error is because this code returns false.
bool cmGlobalVisualStudio14Generator::IsWindowsStoreToolsetInstalled() const
{
const char universal10Key[] =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
"VisualStudio\\14.0\\Setup\\Build Tools for Windows 10;SrcPath";
std::string win10SDK;
return cmSystemTools::ReadRegistryValue(universal10Key, win10SDK,
cmSystemTools::KeyWOW64_32);
}
I have Visual Studio 2015 Pro 14.0.25431.01 Update 3. I have everything installed including tons of options I don't think I need trying to get that registry to appear. My coworker doesn't have this problem with the same versions of CMake and Visual Studio 2015 so I must be on the wrong track even though the code doesn't lie. So what am I missing?
Scott