Externals: Use Common ASSERT for IM_ASSERT
This does introduce a dependency on common and on fmt from imgui, but gives a better experience.
This commit is contained in:
parent
9e19d10f9d
commit
72c7977c72
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue