CMake support in Windows App SDK 2.0.0-experimental7 #6446
Replies: 4 comments 2 replies
-
|
The people who need CMake most aren't usually the ones browsing the WASDK discussions. They’re likely using Qt, Electron, or other cross-platform tools. To get a realistic sense of interest and adoption, you should promote this through other channels like the MS Dev Blogs and social media. Otherwise, you might miss the very audience you’re trying to build this for. |
Beta Was this translation helpful? Give feedback.
-
|
Does this include cppwinrt to generation projection and implementation headers for WinRT? |
Beta Was this translation helpful? Give feedback.
-
|
You asked for the real world usage/feedback so here's my opinion: CMake support is of no use in our Windows desktop app or build pipeline. IMO the dev time would be better spent improving the Windows native experience (devenv, msbuild) . We use C++, C++/CLI and C# in our app. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for working on CMake support. I tried to add the packages to a project, but it seems they're incomplete. Specifically, Furthermore, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Hi Everyone,
We’re introducing CMake support in Windows App SDK 2.0.0-experimental7 as an early flighted experimental capability.
This work provides a repeatable, idiomatic model for consuming the Windows App SDK in CMake, replacing the need for custom setup with a more standardized experience.
Description
The CMake integration is built on NuGetCMakePackage, an open-source CMake module that bridges the gap between NuGet package management and CMake's native find_package() workflow. NuGetCMakePackage handles downloading and restoring NuGet packages at configure time via add_nuget_packages(), probes each package for an embedded cmake config (at build/cmake/-config.cmake), and exposes the package's headers, import libraries, runtime DLLs, and WinRT metadata as standard CMake targets.
Each Windows App SDK NuGet component and dependent package now embeds a CMake configuration file under build/cmake/, which with the help of the NuGetCMakePackage library, allows CMake's find_package() to automatically discover targets, headers, libraries, and runtime DLLs without manual path configuration. This covers all component packages including Foundation, InteractiveExperiences, DWrite, Widgets, AI, ML, and WinUI, as well as dependencies such as Base and Runtime.
This is an early flight intended to gauge adoption and collect feedback. Promotion beyond experimental will depend on demonstrated community interest and the strength of feedback we receive. For sample usage, please refer to CMake sample applications.
What this means
• Provides a standardized, integration model for using Windows App SDK in CMake
• Offers an idiomatic CMake consumption experience alongside existing MSBuild options
Current status
This is experimental:
• Patterns are subject to change
• Some gaps with MSBuild are expected
Things we’re still working through
• How to best model consumption patterns in a way that feels natural in CMake
• Reducing friction around dependency resolution and project setup
Why we’re sharing this
We want early feedback to help shape:
• What “good” looks like for CMake integration
• Where the current experience feels unintuitive or brittle
• What’s missing for real-world usage
Next steps
Please share your feedback and real-world scenarios by replying to this dedicated Discussions post.
If you encounter gaps, usability issues, or have suggestions to improve the developer experience, we’d love to hear from you.
We’ll continue iterating on this experimental feature based on community input and level of interest as we evaluate its future direction.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions