microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.54k stars 238 forks source link

compatible with non-Windows environments #116

Closed zhaijialong closed 4 years ago

zhaijialong commented 4 years ago

I tested with Android NDK, and it's compiled successfully with this patch.

Mixaill commented 4 years ago

Maintainer's decision is to use external sal.h rather than define needed bits in header.

https://github.com/microsoft/DirectXMath/pull/86#issuecomment-596361401

walbourn commented 4 years ago

DirectXMath is included in the Windows source tree as well as shipping in the Windows SDK, so I'm required to use SAL annotation on all functions that use pointers by SDL.

For non-Windows platforms, an easy solution is to just download the open source version of sal.h and include it in your search path. I made a minor change to make this easier to consume if you want to just drop it side-by-side with DirectXMath.

zhaijialong commented 4 years ago

Well, It's OK. Thanks.