From 4797f0a8323b0ae3e005b326d63073fb478cd7d0 Mon Sep 17 00:00:00 2001 From: illyum Date: Thu, 12 Sep 2024 21:25:28 -0600 Subject: [PATCH] feat(cmake): create precompiled header --- CMakeLists.txt | 1 + src/IsoEngine.h | 1 - src/IsoEnginePCH.h | 27 +++++++++++++++++++++++++++ src/Logger.h | 7 ------- src/components/input_component.h | 2 -- src/components/ui_component.h | 2 -- src/network.h | 2 -- 7 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 src/IsoEnginePCH.h diff --git a/CMakeLists.txt b/CMakeLists.txt index f61f120..48f4aa2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,7 @@ target_include_directories(IsoEngine PUBLIC ) target_link_libraries(IsoEngine PRIVATE raylib box2d EnTT::EnTT) +target_precompile_headers(IsoEngine PRIVATE src/IsoEnginePCH.h) # PhysFS linkage if(BUILD_SHARED_LIBS) diff --git a/src/IsoEngine.h b/src/IsoEngine.h index 4a2779b..cd195c8 100644 --- a/src/IsoEngine.h +++ b/src/IsoEngine.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include "network.h" #include "scene_manager.h" diff --git a/src/IsoEnginePCH.h b/src/IsoEnginePCH.h new file mode 100644 index 0000000..87ca935 --- /dev/null +++ b/src/IsoEnginePCH.h @@ -0,0 +1,27 @@ +// +// Created by illyum on 9/12/2024. +// + +#ifndef ISOENGINEPCH_H +#define ISOENGINEPCH_H + +// #ifdef WIN32 +// #include +// #endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#endif //ISOENGINEPCH_H diff --git a/src/Logger.h b/src/Logger.h index a77cdd5..6372dfe 100644 --- a/src/Logger.h +++ b/src/Logger.h @@ -1,12 +1,5 @@ #pragma once -#include -#include -#include -#include -#include -#include - enum class LogLevel { DEBUGL = 0, INFOL = 10, diff --git a/src/components/input_component.h b/src/components/input_component.h index 484a229..48e44eb 100644 --- a/src/components/input_component.h +++ b/src/components/input_component.h @@ -1,6 +1,4 @@ #pragma once -#include -#include enum class InputAction { MOVE_UP, diff --git a/src/components/ui_component.h b/src/components/ui_component.h index a34acd0..7ad29e6 100644 --- a/src/components/ui_component.h +++ b/src/components/ui_component.h @@ -1,6 +1,4 @@ #pragma once -#include -#include enum class UIState { NORMAL, diff --git a/src/network.h b/src/network.h index 935c539..0d55cd5 100644 --- a/src/network.h +++ b/src/network.h @@ -3,8 +3,6 @@ #define SERVER_PORT 6771 #define SERVER_ADDRESS "127.0.0.1" -#include - class Network { public: virtual void Initialize() = 0;