mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 00:10:32 +00:00
Enforced IWYU-style PCH model:
- Removed explicit PCH. - Fixed includes to compile for all supported engine versions, including non-unity builds. - Configured build.cs to treat ImGui as an engine module and added stricter compilation rules.
This commit is contained in:
parent
ac2b80bd63
commit
d4ffe9443f
@ -13,7 +13,7 @@ Version: 1.20
|
||||
|
||||
ImGui version: 1.74
|
||||
|
||||
Supported engine version: 4.24*
|
||||
Supported engine version: 4.25*
|
||||
|
||||
\* *Plugin has been tested and if necessary updated to compile and work with this engine version. As long as possible I will try to maintain backward compatibility of existing features and possibly but not necessarily when adding new features. Right now it should be at least backward compatible with the engine version 4.15.*
|
||||
|
||||
|
@ -23,10 +23,12 @@ public class ImGui : ModuleRules
|
||||
// Enable runtime loader, if you want this module to be automatically loaded in runtime builds (monolithic).
|
||||
bool bEnableRuntimeLoader = true;
|
||||
|
||||
PCHUsage = PCHUsageMode.UseSharedPCHs;
|
||||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
#if UE_4_21_OR_LATER
|
||||
PrivatePCHHeaderFile = "Private/ImGuiPrivatePCH.h";
|
||||
#if UE_4_24_OR_LATER
|
||||
bLegacyPublicIncludePaths = false;
|
||||
ShadowVariableWarningLevel = WarningLevel.Error;
|
||||
bTreatAsEngineModule = true;
|
||||
#endif
|
||||
|
||||
PublicIncludePaths.AddRange(
|
||||
|
@ -1,11 +1,9 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
#include "ImGuiCanvasSizeInfoCustomization.h"
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "ImGuiCanvasSizeInfoCustomization.h"
|
||||
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include <PropertyCustomizationHelpers.h>
|
||||
|
@ -1,11 +1,9 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
#include "ImGuiEditor.h"
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "ImGuiEditor.h"
|
||||
|
||||
#include "ImGuiCanvasSizeInfoCustomization.h"
|
||||
#include "ImGuiKeyInfoCustomization.h"
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
@ -1,11 +1,9 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
#include "ImGuiKeyInfoCustomization.h"
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
||||
#include "ImGuiKeyInfoCustomization.h"
|
||||
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include <PropertyCustomizationHelpers.h>
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiContextManager.h"
|
||||
|
||||
#include "ImGuiDelegatesContainer.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ImGuiContextProxy.h"
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
|
||||
class FImGuiModuleSettings;
|
||||
|
@ -1,13 +1,12 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiContextProxy.h"
|
||||
|
||||
#include "ImGuiDelegatesContainer.h"
|
||||
#include "ImGuiImplementation.h"
|
||||
#include "ImGuiInteroperability.h"
|
||||
#include "Utilities/Arrays.h"
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
#include <GenericPlatform/GenericPlatformFile.h>
|
||||
#include <Misc/Paths.h>
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiDelegates.h"
|
||||
#include "ImGuiDelegatesContainer.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiDelegatesContainer.h"
|
||||
|
||||
#include "Utilities/WorldContextIndex.h"
|
||||
|
@ -1,8 +1,7 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiDemo.h"
|
||||
|
||||
#include "ImGuiModuleProperties.h"
|
||||
|
||||
#include <CoreGlobals.h>
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <CoreMinimal.h>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
class FImGuiModuleProperties;
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiDrawData.h"
|
||||
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ImGuiInteroperability.h"
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
#include <Rendering/RenderingCommon.h>
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
#include "ImGuiImplementation.h"
|
||||
|
||||
// We build ImGui source code as part of this module. This is for convenience (no need to manually build libraries for
|
||||
// different target platforms) but it also exposes the whole ImGui source for inspection, which can be pretty handy.
|
||||
// Source files are included from Third Party directory, so we can wrap them in required by Unreal Build System headers
|
||||
// without modifications in ImGui source code.
|
||||
//
|
||||
#include <CoreMinimal.h>
|
||||
|
||||
// For convenience and easy access to the ImGui source code, we build it as part of this module.
|
||||
// We don't need to define IMGUI_API manually because it is already done for this module.
|
||||
|
||||
#if PLATFORM_XBOXONE
|
||||
@ -20,8 +18,6 @@
|
||||
#endif // PLATFORM_WINDOWS
|
||||
|
||||
#if WITH_EDITOR
|
||||
#include "imgui.h"
|
||||
|
||||
// Global ImGui context pointer.
|
||||
ImGuiContext* GImGuiContextPtr = nullptr;
|
||||
// Handle to the global ImGui context pointer.
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
struct ImGuiContext;
|
||||
|
||||
// Gives access to selected ImGui implementation features.
|
||||
namespace ImGuiImplementation
|
||||
|
@ -1,17 +1,18 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiInputHandler.h"
|
||||
|
||||
#include "ImGuiContextProxy.h"
|
||||
#include "ImGuiInputState.h"
|
||||
#include "ImGuiModuleDebug.h"
|
||||
#include "ImGuiModuleManager.h"
|
||||
#include "ImGuiModuleSettings.h"
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
#include <Engine/Console.h>
|
||||
#include <Framework/Application/SlateApplication.h>
|
||||
#include <GameFramework/InputSettings.h>
|
||||
#include <InputCoreTypes.h>
|
||||
#include <Input/Events.h>
|
||||
|
||||
#if WITH_EDITOR
|
||||
|
@ -1,11 +1,12 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiInputHandlerFactory.h"
|
||||
#include "ImGuiInputHandler.h"
|
||||
|
||||
#include "ImGuiModuleDebug.h"
|
||||
|
||||
#include <Engine/GameViewportClient.h>
|
||||
#include <InputCoreTypes.h>
|
||||
|
||||
|
||||
UImGuiInputHandler* FImGuiInputHandlerFactory::NewHandler(const FStringClassReference& HandlerClassReference, FImGuiModuleManager* ModuleManager, UGameViewportClient* GameViewport, int32 ContextIndex)
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiInputState.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -1,8 +1,7 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiInteroperability.h"
|
||||
|
||||
#include "ImGuiInputState.h"
|
||||
#include "Utilities/Arrays.h"
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiModule.h"
|
||||
|
||||
#include "ImGuiDelegatesContainer.h"
|
||||
|
@ -1,10 +1,8 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiModuleCommands.h"
|
||||
#include "ImGuiModuleProperties.h"
|
||||
|
||||
#include "ImGuiModuleProperties.h"
|
||||
#include "Utilities/DebugExecBindings.h"
|
||||
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiModuleManager.h"
|
||||
|
||||
#include "ImGuiInteroperability.h"
|
||||
|
@ -1,15 +1,13 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include "ImGuiModuleCommands.h"
|
||||
#include "ImGuiModuleProperties.h"
|
||||
|
||||
#include <ConfigCacheIni.h>
|
||||
#include <Engine/Engine.h>
|
||||
#include <GameFramework/GameUserSettings.h>
|
||||
#include <Misc/ConfigCacheIni.h>
|
||||
|
||||
|
||||
//====================================================================================================
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
#include <SlateTypes.h>
|
||||
#include <Curves/CurveFloat.h>
|
||||
#include <Delegates/Delegate.h>
|
||||
#include <InputCoreTypes.h>
|
||||
#include <Styling/SlateTypes.h>
|
||||
#include <UObject/Object.h>
|
||||
|
||||
// We use FStringClassReference, which is supported by older and newer engine versions. Starting from 4.18, it is
|
||||
|
@ -1,15 +0,0 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
// Module-wide macros
|
||||
#include "VersionCompatibility.h"
|
||||
#include "ImGuiModuleDebug.h"
|
||||
|
||||
// Module
|
||||
#include "ImGuiModule.h"
|
||||
|
||||
// Engine
|
||||
#include <CoreMinimal.h>
|
||||
#include <Engine/Engine.h>
|
||||
|
||||
// You should place include statements to your module's private header files here. You only need to
|
||||
// add includes for headers that are used in most of your module's source files though.
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "ImGuiTextureHandle.h"
|
||||
|
||||
#include "ImGuiInteroperability.h"
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "TextureManager.h"
|
||||
|
||||
#include <Engine/Texture2D.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include <Styling/SlateBrush.h>
|
||||
#include <Textures/SlateShaderResource.h>
|
||||
#include <UObject/WeakObjectPtr.h>
|
||||
|
||||
|
||||
class UTexture2D;
|
||||
|
@ -1,8 +1,7 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "DebugExecBindings.h"
|
||||
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include <GameFramework/PlayerInput.h>
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
class FString;
|
||||
struct FImGuiKeyInfo;
|
||||
|
||||
namespace DebugExecBindings
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "WorldContext.h"
|
||||
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <CoreMinimal.h>
|
||||
#include <Engine/Engine.h>
|
||||
#include <Engine/GameInstance.h>
|
||||
#include <Engine/GameViewportClient.h>
|
||||
#include <UObject/WeakObjectPtr.h>
|
||||
|
||||
|
||||
// Utilities helping to get a World Context.
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "SImGuiCanvasControl.h"
|
||||
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
#include <Rendering/DrawElements.h>
|
||||
#include <SlateOptMacros.h>
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "ImGuiInputState.h"
|
||||
#include "ImGuiModuleDebug.h"
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include <Brushes/SlateBorderBrush.h>
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "SImGuiLayout.h"
|
||||
#include "SImGuiWidget.h"
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <UObject/WeakObjectPtr.h>
|
||||
#include <Widgets/DeclarativeSyntaxSupport.h>
|
||||
#include <Widgets/SCompoundWidget.h>
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
||||
|
||||
#include "ImGuiPrivatePCH.h"
|
||||
|
||||
#include "SImGuiWidget.h"
|
||||
#include "SImGuiCanvasControl.h"
|
||||
|
||||
@ -15,6 +13,7 @@
|
||||
#include "TextureManager.h"
|
||||
#include "Utilities/Arrays.h"
|
||||
#include "Utilities/ScopeGuards.h"
|
||||
#include "VersionCompatibility.h"
|
||||
|
||||
#include <Engine/Console.h>
|
||||
#include <Engine/GameViewportClient.h>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "ImGuiModuleSettings.h"
|
||||
|
||||
#include <Rendering/RenderingCommon.h>
|
||||
#include <UObject/WeakObjectPtr.h>
|
||||
#include <Widgets/DeclarativeSyntaxSupport.h>
|
||||
#include <Widgets/SCompoundWidget.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user