Compile stb_image as C++ and use proper assertion handler
This commit is contained in:
parent
ac0f45d9f0
commit
6ff3351ab8
2 changed files with 4 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
find_file(KHR_PLATFORM_FILE KHR/khrplatform.h)
|
||||
|
||||
file(GLOB_RECURSE PSEMEK_GFX_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp" "include/*.h")
|
||||
file(GLOB_RECURSE PSEMEK_GFX_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp" "source/*.c")
|
||||
file(GLOB_RECURSE PSEMEK_GFX_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp")
|
||||
|
||||
psemek_add_library(psemek-gfx ${PSEMEK_GFX_HEADERS} ${PSEMEK_GFX_SOURCES} "${CMAKE_CURRENT_SOURCE_DIR}/api/${PSEMEK_GL_API}/source/gl.cpp")
|
||||
target_include_directories(psemek-gfx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/api/${PSEMEK_GL_API}/include")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STBI_FAILURE_USERMSG
|
||||
|
||||
#include <psemek/util/assert.hpp>
|
||||
#define STBI_ASSERT(x) assert(x)
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#include <psemek/gfx/detail/stb_image.h>
|
||||
Loading…
Add table
Reference in a new issue