Building WinUI 3 Desktop Application using LLVM/Clang

168 Views Asked by At

When I create a WinUI project in Visual Studio, below is how the project structure looks like: WinUI App Project structure

This project by default gets built using MSBuild.

However, I would like to build this project using LLVM Clang-Cl. Stating for ample clarity, I would also be wanting to use the Generator as 'Ninja'.

Is this possible to achieve?

As a bunch of headers get generated when this project is built, I tried using running cppwinrt.exe manually on this project to generate the relevant headers. While few headers got generated but still a bunch were missing. Also, could not understand how the .g.h/.g.cpp files can get generated without MSBuild.

I have also tried this link - https://github.com/fredemmott/cmake-cpp-winrt-winui3. However, the same doesnt work with LLVM/Clang and Ninja.

Any pointers/suggestions will help.

0

There are 0 best solutions below