From b7a70ac707cfabe73b18ec8219cb80fd3d201805 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 31 May 2022 23:24:31 +0200 Subject: [PATCH] Add compiler switgxh for using static linkage for std_image --- code/Common/Assimp.cpp | 4 +++- code/Pbrt/PbrtExporter.cpp | 2 -- test/unit/Main.cpp | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/Common/Assimp.cpp b/code/Common/Assimp.cpp index 10cfe7902..ee798238e 100644 --- a/code/Common/Assimp.cpp +++ b/code/Common/Assimp.cpp @@ -1284,7 +1284,9 @@ ASSIMP_API void aiQuaternionInterpolate( #if ASSIMP_NEEDS_STB_IMAGE // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. # define STBI_ONLY_PNG -# define STB_IMAGE_STATIC +# ifdef ASSIMP_USE_STB_IMAGE_STATIC +# define STB_IMAGE_STATIC +# endif # define STB_IMAGE_IMPLEMENTATION # include "Common/StbCommon.h" #endif diff --git a/code/Pbrt/PbrtExporter.cpp b/code/Pbrt/PbrtExporter.cpp index fddee26a2..6a26d3261 100644 --- a/code/Pbrt/PbrtExporter.cpp +++ b/code/Pbrt/PbrtExporter.cpp @@ -83,9 +83,7 @@ Other: #include #include -#if ASSIMP_NEEDS_STB_IMAGE #include "Common/StbCommon.h" -#endif using namespace Assimp; diff --git a/test/unit/Main.cpp b/test/unit/Main.cpp index d5049faad..573c26a96 100644 --- a/test/unit/Main.cpp +++ b/test/unit/Main.cpp @@ -1,6 +1,5 @@ #include "../../include/assimp/DefaultLogger.hpp" #include "UnitTestPCH.h" - #include #include