Skip to content

Commit

Permalink
TinyGltfImporter: restrict Windows.h dumpster fire fighting to Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Sep 9, 2018
1 parent 23ae093 commit 53c4c9d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/MagnumPlugins/TinyGltfImporter/TinyGltfImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,20 @@
/* Opt out of loading external images */
#define TINYGLTF_NO_EXTERNAL_IMAGE

#ifdef CORRADE_TARGET_WINDOWS
/* Tinygltf includes some windows headers, avoid including more than ncessary
to speed up compilation. */
#define WIN32_LEAN_AND_MEAN
to speed up compilation. WIN32_LEAN_AND_MEAN and NOMINMAX is already defined
by CMake. */
#define VC_EXTRALEAN
#endif

/* Include like this instead of "MagnumExternal/TinyGltf/tiny_gltf.h" so we can
include it as a system header and suppress warnings */
#include "tiny_gltf.h"
#ifdef CORRADE_TARGET_WINDOWS
#undef near
#undef far
#endif

namespace Magnum { namespace Trade {

Expand Down

0 comments on commit 53c4c9d

Please sign in to comment.