mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
build: Make ImHex fully compile with MSVC and Clang CL
This does NOT make ImHex work yet. However it can now be compiled
This commit is contained in:
7
lib/third_party/imgui/CMakeLists.txt
vendored
7
lib/third_party/imgui/CMakeLists.txt
vendored
@@ -13,4 +13,9 @@ add_subdirectory(imnodes)
|
||||
add_subdirectory(backend)
|
||||
add_subdirectory(ColorTextEditor)
|
||||
|
||||
set(IMGUI_LIBRARIES imgui_imgui imgui_cimgui imgui_implot imgui_implot3d imgui_imnodes imgui_backend imgui_color_text_editor PARENT_SCOPE)
|
||||
set(IMGUI_LIBRARIES imgui_imgui imgui_cimgui imgui_implot imgui_implot3d imgui_imnodes imgui_backend imgui_color_text_editor)
|
||||
set(IMGUI_LIBRARIES ${IMGUI_LIBRARIES} PARENT_SCOPE)
|
||||
|
||||
foreach (LIBRARY IN LISTS IMGUI_LIBRARIES)
|
||||
target_compile_definitions(${LIBRARY} PRIVATE EXPORT_SYMBOLS=1)
|
||||
endforeach ()
|
||||
@@ -5011,8 +5011,16 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target,
|
||||
#endif
|
||||
|
||||
#ifndef GL3W_API
|
||||
#ifdef _MSC_VER
|
||||
#if EXPORT_SYMBOLS == 1
|
||||
#define GL3W_API __declspec(dllexport)
|
||||
#else
|
||||
#define GL3W_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define GL3W_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __gl_h_
|
||||
#define __gl_h_
|
||||
|
||||
16
lib/third_party/imgui/imgui/include/imconfig.h
vendored
16
lib/third_party/imgui/imgui/include/imconfig.h
vendored
@@ -32,6 +32,22 @@ namespace hex::log::impl {
|
||||
//#define IMGUI_API __declspec( dllexport )
|
||||
//#define IMGUI_API __declspec( dllimport )
|
||||
|
||||
#if EXPORT_SYMBOLS == 1
|
||||
#define IMGUI_API __declspec(dllexport)
|
||||
#define IMGUI_IMPL_API __declspec(dllexport)
|
||||
#define IMPLOT_API __declspec(dllexport)
|
||||
#define IMPLOT_IMPL_API __declspec(dllexport)
|
||||
#define IMPLOT3D_API __declspec(dllexport)
|
||||
#define IMPLOT3D_IMPL_API __declspec(dllexport)
|
||||
#else
|
||||
#define IMGUI_API __declspec(dllimport)
|
||||
#define IMGUI_IMPL_API __declspec(dllimport)
|
||||
#define IMPLOT_API __declspec(dllimport)
|
||||
#define IMPLOT_IMPL_API __declspec(dllimport)
|
||||
#define IMPLOT3D_API __declspec(dllimport)
|
||||
#define IMPLOT3D_IMPL_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
|
||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
struct ImNodesContext;
|
||||
|
||||
extern ImNodesContext* GImNodes;
|
||||
IMGUI_API extern ImNodesContext* GImNodes;
|
||||
|
||||
// [SECTION] internal enums
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define sscanf sscanf_s
|
||||
#endif
|
||||
|
||||
ImNodesContext* GImNodes = NULL;
|
||||
IMGUI_API ImNodesContext* GImNodes = NULL;
|
||||
|
||||
namespace IMNODES_NAMESPACE
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user