make imgui endianess aware

This commit is contained in:
Green Sky 2025-04-09 11:57:30 +02:00
parent 5bd76bb2be
commit 0bfeb64026
No known key found for this signature in database
GPG Key ID: DBE05085D874AB4A

View File

@ -21,6 +21,13 @@ add_library(imgui
target_compile_definitions(imgui PUBLIC IMGUI_USE_WCHAR32) target_compile_definitions(imgui PUBLIC IMGUI_USE_WCHAR32)
target_compile_features(imgui PUBLIC cxx_std_11) target_compile_features(imgui PUBLIC cxx_std_11)
if(DEFINED CMAKE_CXX_BYTE_ORDER)
if(CMAKE_CXX_BYTE_ORDER STREQUAL "BIG_ENDIAN")
# for opengl and sdlrenderer
target_compile_definitions(imgui PUBLIC IMGUI_USE_BGRA_PACKED_COLOR)
endif()
else()
if (TARGET Freetype::Freetype) if (TARGET Freetype::Freetype)
message(STATUS "Freetype detected, enabling support in imgui") message(STATUS "Freetype detected, enabling support in imgui")
target_sources(imgui PUBLIC target_sources(imgui PUBLIC