From 7d8a61d6dc1d031b4a8a3c0ca19d804443788a5e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 10 Jul 2023 14:26:27 -0500 Subject: [PATCH] don't use IMGUI_USER_CONFIG apparently a specific build of GCC 11.2.0 has a bug which prevents using defines in #include --- CMakeLists.txt | 3 +-- extern/{imgui_conf => imgui_patched}/imconfig_fur.h | 0 extern/imgui_patched/imgui.h | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) rename extern/{imgui_conf => imgui_patched}/imconfig_fur.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fb2aa91..caee04a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -805,7 +805,6 @@ if (BUILD_GUI) list(APPEND USED_SOURCES ${GUI_SOURCES}) list(APPEND DEPENDENCIES_INCLUDE_DIRS extern/imgui_patched - extern/imgui_conf extern/imgui_patched/backends extern/IconFontCppHeaders extern/igfd @@ -877,7 +876,7 @@ else() endif() target_include_directories(furnace SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS}) -target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES} IMGUI_USER_CONFIG="imconfig_fur.h") +target_compile_definitions(furnace PRIVATE ${DEPENDENCIES_DEFINES}) target_compile_options(furnace PRIVATE ${DEPENDENCIES_COMPILE_OPTIONS}) target_link_libraries(furnace PRIVATE ${DEPENDENCIES_LIBRARIES}) if (PKG_CONFIG_FOUND AND (SYSTEM_FMT OR SYSTEM_LIBSNDFILE OR SYSTEM_ZLIB OR SYSTEM_SDL2 OR SYSTEM_RTMIDI OR WITH_JACK)) diff --git a/extern/imgui_conf/imconfig_fur.h b/extern/imgui_patched/imconfig_fur.h similarity index 100% rename from extern/imgui_conf/imconfig_fur.h rename to extern/imgui_patched/imconfig_fur.h diff --git a/extern/imgui_patched/imgui.h b/extern/imgui_patched/imgui.h index f7801136..8674f997 100644 --- a/extern/imgui_patched/imgui.h +++ b/extern/imgui_patched/imgui.h @@ -52,9 +52,7 @@ Index of this file: // Configuration file with compile-time options // (edit imconfig.h or '#define IMGUI_USER_CONFIG "myfilename.h" from your build system') -#ifdef IMGUI_USER_CONFIG -#include IMGUI_USER_CONFIG -#endif +#include "imconfig_fur.h" #include "imconfig.h" #ifndef IMGUI_DISABLE