Fixed build errors when the plugin is placed in the engine directory. (#19)

Merged 4 commits fixing build errors when compiling this as an engine plugin:
- Changed include directives to use full paths (ex. <ICursor.h> -> <GenericPlatform/ICursor.h>).
- Added categories to FImGuiKeyInfo properties (required for all blueprint exposed types in engine plugins).
- Added explicit configuration of PCHUsage (without that it is assumed to be UseExplicitOrSharedPCHs in engine plugins and UseSharedPCHs in game ones) - amended to work also in the older engine versions.
This commit is contained in:
kkawachi 2019-07-28 02:06:29 +09:00 committed by Sebastian
parent 10ce6386d4
commit 5e4b7084de
10 changed files with 19 additions and 17 deletions

View File

@ -23,6 +23,8 @@ public class ImGui : ModuleRules
// Enable runtime loader, if you want this module to be automatically loaded in runtime builds (monolithic). // Enable runtime loader, if you want this module to be automatically loaded in runtime builds (monolithic).
bool bEnableRuntimeLoader = true; bool bEnableRuntimeLoader = true;
PCHUsage = PCHUsageMode.UseSharedPCHs;
#if UE_4_21_OR_LATER #if UE_4_21_OR_LATER
PrivatePCHHeaderFile = "Private/ImGuiPrivatePCH.h"; PrivatePCHHeaderFile = "Private/ImGuiPrivatePCH.h";
#endif #endif

View File

@ -6,7 +6,7 @@
#include "ImGuiInputState.h" #include "ImGuiInputState.h"
#include "Utilities/WorldContextIndex.h" #include "Utilities/WorldContextIndex.h"
#include <ICursor.h> #include <GenericPlatform/ICursor.h>
#include <imgui.h> #include <imgui.h>

View File

@ -25,7 +25,7 @@ ImGuiContext** GImGuiContextPtrHandle = &GImGuiContextPtr;
#endif // WITH_EDITOR #endif // WITH_EDITOR
#if PLATFORM_WINDOWS #if PLATFORM_WINDOWS
#include <AllowWindowsPlatformTypes.h> #include <Windows/AllowWindowsPlatformTypes.h>
#endif // PLATFORM_WINDOWS #endif // PLATFORM_WINDOWS
#include "imgui.cpp" #include "imgui.cpp"
@ -35,7 +35,7 @@ ImGuiContext** GImGuiContextPtrHandle = &GImGuiContextPtr;
#include "misc/stl/imgui_stl.cpp" #include "misc/stl/imgui_stl.cpp"
#if PLATFORM_WINDOWS #if PLATFORM_WINDOWS
#include <HideWindowsPlatformTypes.h> #include <Windows/HideWindowsPlatformTypes.h>
#endif // PLATFORM_WINDOWS #endif // PLATFORM_WINDOWS
#include "ImGuiInteroperability.h" #include "ImGuiInteroperability.h"
@ -54,4 +54,4 @@ namespace ImGuiImplementation
GImGuiContextPtrHandle = Handle; GImGuiContextPtrHandle = Handle;
} }
#endif // WITH_EDITOR #endif // WITH_EDITOR
} }

View File

@ -13,9 +13,9 @@
#include <Input/Events.h> #include <Input/Events.h>
#if WITH_EDITOR #if WITH_EDITOR
#include <Commands/InputBindingManager.h> #include <Framework/Commands/InputBindingManager.h>
#include <Commands/InputChord.h> #include <Framework/Commands/InputChord.h>
#include <DebuggerCommands.h> #include <Kismet2/DebuggerCommands.h>
#endif // WITH_EDITOR #endif // WITH_EDITOR

View File

@ -4,7 +4,7 @@
#include "TextureManager.h" #include "TextureManager.h"
#include <ICursor.h> #include <GenericPlatform/ICursor.h>
#include <imgui.h> #include <imgui.h>

View File

@ -15,7 +15,7 @@
#include "Editor/ImGuiEditor.h" #include "Editor/ImGuiEditor.h"
#endif #endif
#include <IPluginManager.h> #include <Interfaces/IPluginManager.h>
#define IMGUI_REDIRECT_OBSOLETE_DELEGATES 1 #define IMGUI_REDIRECT_OBSOLETE_DELEGATES 1

View File

@ -2,7 +2,7 @@
#pragma once #pragma once
#include <IConsoleManager.h> #include <HAL/IConsoleManager.h>
struct FImGuiKeyInfo; struct FImGuiKeyInfo;

View File

@ -7,7 +7,7 @@
#include "ImGuiInteroperability.h" #include "ImGuiInteroperability.h"
#include "Utilities/WorldContextIndex.h" #include "Utilities/WorldContextIndex.h"
#include <ModuleManager.h> #include <Modules/ModuleManager.h>
#include <imgui.h> #include <imgui.h>

View File

@ -17,19 +17,19 @@ struct FImGuiKeyInfo
{ {
GENERATED_BODY() GENERATED_BODY()
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere, Category = "Input")
FKey Key; FKey Key;
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere, Category = "Input")
ECheckBoxState Shift = ECheckBoxState::Undetermined; ECheckBoxState Shift = ECheckBoxState::Undetermined;
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere, Category = "Input")
ECheckBoxState Ctrl = ECheckBoxState::Undetermined; ECheckBoxState Ctrl = ECheckBoxState::Undetermined;
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere, Category = "Input")
ECheckBoxState Alt = ECheckBoxState::Undetermined; ECheckBoxState Alt = ECheckBoxState::Undetermined;
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere, Category = "Input")
ECheckBoxState Cmd = ECheckBoxState::Undetermined; ECheckBoxState Cmd = ECheckBoxState::Undetermined;
friend bool operator==(const FImGuiKeyInfo& Lhs, const FImGuiKeyInfo& Rhs) friend bool operator==(const FImGuiKeyInfo& Lhs, const FImGuiKeyInfo& Rhs)

View File

@ -6,7 +6,7 @@
#include "ImGuiModuleProperties.h" #include "ImGuiModuleProperties.h"
#include "ImGuiTextureHandle.h" #include "ImGuiTextureHandle.h"
#include <ModuleManager.h> #include <Modules/ModuleManager.h>
class FImGuiModule : public IModuleInterface class FImGuiModule : public IModuleInterface