From 4b2de39396c864a897bb5185acdd319bc60e9cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 5 Sep 2022 19:24:51 +0200 Subject: [PATCH] singles: update MagnumMath docs with what CorradeCpu has already. In particular: - listing the *very important* stuff -- such as what macro to define to make the library usable at all -- in the header - mentioning what to do if cross-SO/DLL visibility is desired The actual generated single-header file will be updated once I find more time. Not now. --- doc/namespaces.dox | 6 ++++-- src/singles/MagnumMath.hpp | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/namespaces.dox b/doc/namespaces.dox index a3927ea5a..361294b9d 100644 --- a/doc/namespaces.dox +++ b/doc/namespaces.dox @@ -109,8 +109,10 @@ more information. #include @endcode @par - In addition, contents of the @ref GlmIntegration and @ref EigenIntegration - libraries are included as well --- opt-in by specifying either + If you need the deinlined symbols to be exported from a shared library, + @cpp #define MAGNUM_EXPORT @ce as appropriate. In addition, contents of the + @ref GlmIntegration and @ref EigenIntegration libraries are included as + well --- opt-in by specifying either @cpp #define MAGNUM_MATH_GLM_INTEGRATION @ce or @cpp #define MAGNUM_MATH_EIGEN_INTEGRATION @ce before including the file. Including it multiple times with different macros defined works as well. diff --git a/src/singles/MagnumMath.hpp b/src/singles/MagnumMath.hpp index 3ab46ddc8..fab3cb5f5 100644 --- a/src/singles/MagnumMath.hpp +++ b/src/singles/MagnumMath.hpp @@ -15,6 +15,19 @@ - GitHub project page — https://github.com/mosra/magnum - GitHub Singles repository — https://github.com/mosra/magnum-singles + The library has a separate non-inline implementation part, enable it *just + once* like this: + + #define MAGNUM_MATH_IMPLEMENTATION + #include + + If you need the deinlined symbols to be exported from a shared library, + `#define MAGNUM_EXPORT` as appropriate. In addition, contents of the + GlmIntegration and EigenIntegration libraries are included as well --- + opt-in by specifying either `#define MAGNUM_MATH_GLM_INTEGRATION` or + `#define MAGNUM_MATH_EIGEN_INTEGRATION` before including the file. + Including it multiple times with different macros defined works as well. + v2020.06-0-gfac6f4da2 (2020-06-27) - Various fixes for Clang-CL compatibility - Expanding the APIs to work with Half and long double types