From 0bfeb64026e12e596a9f8d3ea1aa23a2c6c4a746 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Wed, 9 Apr 2025 11:57:30 +0200 Subject: [PATCH] make imgui endianess aware --- external/imgui/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/external/imgui/CMakeLists.txt b/external/imgui/CMakeLists.txt index e77f07d..aadae9c 100644 --- a/external/imgui/CMakeLists.txt +++ b/external/imgui/CMakeLists.txt @@ -21,6 +21,13 @@ add_library(imgui target_compile_definitions(imgui PUBLIC IMGUI_USE_WCHAR32) 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) message(STATUS "Freetype detected, enabling support in imgui") target_sources(imgui PUBLIC