Skip to content

Commit

Permalink
Added CESIUM_NO_STB_IMAGE_IMPLEMENTATION option
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed May 9, 2024
1 parent cd67f6f commit 9d3f880
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CesiumGltfReader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ target_link_libraries(CesiumGltfReader
meshoptimizer
)

if (CESIUM_NO_STB_IMAGE_IMPLEMENTATION)
target_compile_definitions(CesiumGltfReader PRIVATE CESIUM_NO_STB_IMAGE_IMPLEMENTATION)
endif()

install(TARGETS CesiumGltfReader
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CesiumGltfReader
Expand Down
2 changes: 2 additions & 0 deletions CesiumGltfReader/src/GltfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ namespace Cesium {
#undef STBIRDEF
}; // namespace Cesium

#ifndef CESIUM_NO_STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#endif
#include <stb_image.h>
#include <turbojpeg.h>

Expand Down

0 comments on commit 9d3f880

Please sign in to comment.