diff --git a/Externals/imgui/CMakeLists.txt b/Externals/imgui/CMakeLists.txt index e3c3c8c99f..b3d48432a1 100644 --- a/Externals/imgui/CMakeLists.txt +++ b/Externals/imgui/CMakeLists.txt @@ -1,3 +1,7 @@ +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + set(SRCS imgui.cpp imgui_draw.cpp @@ -8,3 +12,8 @@ set(SRCS add_library(imgui STATIC ${SRCS}) target_include_directories(imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") +target_link_libraries(imgui +PRIVATE + common + fmt::fmt +) diff --git a/Externals/imgui/README.txt b/Externals/imgui/README.txt new file mode 100644 index 0000000000..0380b1f3b8 --- /dev/null +++ b/Externals/imgui/README.txt @@ -0,0 +1 @@ +When updating, make sure to preserve changes to imconfig.h. Dolphin modifies it to use a custom assertion handler and to tweak settings. diff --git a/Externals/imgui/imconfig.h b/Externals/imgui/imconfig.h index f255601704..5cdc92ecaa 100644 --- a/Externals/imgui/imconfig.h +++ b/Externals/imgui/imconfig.h @@ -14,10 +14,11 @@ #pragma once +#include "Common/Assert.h" + //---- Define assertion handler. Defaults to calling assert(). // If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement. -//#define IM_ASSERT(_EXPR) MyAssert(_EXPR) -//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts +#define IM_ASSERT(_EXPR) ASSERT(_EXPR) //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows // Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.