DirectXMath is an open-source 3D math library that’s usable outside Windows and Direct3D too. This project uses CMake to build a toy program using DirectXMath. It uses CMake to:
- Fetch DirectXMath
- Fetch
sal.h
if missing- An internal, header-only dependency of DirectXMath headers
If there’re conflicts due to the downloaded sal.h
with projects like stb when compiling with GCC and Clang use NoSAL.
Tested on
- Linux + GCC
- macOS + Clang
- Windows + MSVC
- Windows + MinGW (MSYS2)
# generate build files
cmake -B build
# build and run
cmake --build build -t run
Additionally -G
can be used to choose the generator in the generate step e.g. cmake -B build -G Ninja
.