[Build] Fix building on Windows
This merge request implements support for building on Windows.
The requirements are:
-
Visual Studio Build Tools 2022
with the following entries installed:MSVC v143
Windows 11 SDK
-
llvm
andninja
(optional)
Default (MSVC)
By default, CMake will use the Visual Studio 17 2022
generator and build with MSVC and MSBuild. The executable will be placed inside a Debug/Release
folder inside the build
directory.
Ninja (LLVM/Clang)
When ninja
is installed, sbs
will detect it and set it as the generator. The only toolchain that has been tested to work is the llvm
toolchain, which can be installed via winget
. The way LLVM works on Windows is that it uses the clang compiler to produce the object files, then uses MSVC to link with Windows libraries.
I didn't even try to get MinGW to work. MinGW is a huge pile of shit and it needs to die.