I am trying to compile a Windows UWP-targeted project with cmake, but it
seems that cmake is saying that it can’t find all the required Windows
SDK files even though I believe I have installed the required packages.
I have Visual Studio 2022, and using its installer, I installed the
Universal Windows Platform development tools and Desktop development for
C++ workloads. I also have installed the Windows 11 SDK, version
10.0.22621.0, and the MSVC v143 - VS 2022 C++ x64/86 build tools. I am
using CMake Version 3.26.0. The host system is running Windows 10. The
Windows 10 SDK is in its usual location of C:\Program Files
With the combination of CMAKE_SYSTEM_NAME=WindowsStore and
CMAKE_SYSTEM_VERSION=10.0, and using the Visual Studio 17 2022
generator, I receive the error message: “A Windows Store component with
CMake requires both the Windows Desktop SDK as well as the Windows Store
‘10.0’ SDK. Please make sure that you have both installed”
I ran the cmake command inside the Developer PowerShell for VS 2022
environment, but to no avail. I also tried running the command with the
cmake version that came bundled with Visual Studio, but that resulted in
the same error message. However, I can build UWP-targeted apps inside
Visual Studio just fine.
It is as if I am missing something that needs to be installed, but I
have been unable to determine the cause of the issue.
I would appreciate suggestions on what further steps I should take in
order to get cmake to find the SDK files it is looking for.