Переглянути джерело

Add compiler switgxh for using static linkage for std_image

Kim Kulling 3 роки тому
батько
коміт
b7a70ac707
3 змінених файлів з 3 додано та 4 видалено
  1. 3 1
      code/Common/Assimp.cpp
  2. 0 2
      code/Pbrt/PbrtExporter.cpp
  3. 0 1
      test/unit/Main.cpp

+ 3 - 1
code/Common/Assimp.cpp

@@ -1284,7 +1284,9 @@ ASSIMP_API void aiQuaternionInterpolate(
 #if ASSIMP_NEEDS_STB_IMAGE
 #if ASSIMP_NEEDS_STB_IMAGE
     // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy.
     // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy.
 #   define STBI_ONLY_PNG
 #   define STBI_ONLY_PNG
-#   define STB_IMAGE_STATIC
+#   ifdef ASSIMP_USE_STB_IMAGE_STATIC
+#       define STB_IMAGE_STATIC
+#   endif
 #   define STB_IMAGE_IMPLEMENTATION
 #   define STB_IMAGE_IMPLEMENTATION
 #   include "Common/StbCommon.h"
 #   include "Common/StbCommon.h"
 #endif
 #endif

+ 0 - 2
code/Pbrt/PbrtExporter.cpp

@@ -83,9 +83,7 @@ Other:
 #include <sstream>
 #include <sstream>
 #include <string>
 #include <string>
 
 
-#if ASSIMP_NEEDS_STB_IMAGE
 #include "Common/StbCommon.h"
 #include "Common/StbCommon.h"
-#endif
 
 
 using namespace Assimp;
 using namespace Assimp;
 
 

+ 0 - 1
test/unit/Main.cpp

@@ -1,6 +1,5 @@
 #include "../../include/assimp/DefaultLogger.hpp"
 #include "../../include/assimp/DefaultLogger.hpp"
 #include "UnitTestPCH.h"
 #include "UnitTestPCH.h"
-
 #include <math.h>
 #include <math.h>
 #include <time.h>
 #include <time.h>