diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 12:54:15 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 12:54:15 +0200 |
commit | 7b61abef4662560924265357fbe8c4d50ecd389c (patch) | |
tree | d73c41ce9102a40cc5b27fac75efcb9efa789b9e | |
parent | 700942f351d85f326bb1d6725e688920dc8de942 (diff) |
a
-rw-r--r-- | compat/integer-types.hpp | 9 | ||||
-rw-r--r-- | editor/CMakeLists.txt | 4 | ||||
-rw-r--r-- | editor/events.cpp | 5 | ||||
-rw-r--r-- | editor/precomp.hpp | 18 | ||||
-rw-r--r-- | editor/update.cpp | 1 | ||||
-rw-r--r-- | main/CMakeLists.txt | 5 | ||||
-rw-r--r-- | main/precomp.hpp | 15 | ||||
-rw-r--r-- | src/precomp.hpp | 2 |
8 files changed, 42 insertions, 17 deletions
diff --git a/compat/integer-types.hpp b/compat/integer-types.hpp index 14243e72..d270abda 100644 --- a/compat/integer-types.hpp +++ b/compat/integer-types.hpp @@ -1,10 +1,5 @@ #pragma once -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wlanguage-extension-token" -#endif - #ifdef _MSC_VER #ifdef _WIN64 typedef unsigned __int64 size_t; @@ -56,7 +51,3 @@ using ::uint16_t; using ::uint32_t; using ::uint64_t; } // namespace std - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index aef82fec..8e96f92b 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -12,4 +12,8 @@ endif() add_executable(${self} "${sources}" "${res}" "../loader/loader-impl.cpp") target_link_libraries(${self} ${PROJECT_NAME}-main) +if(FLOORMAT_PRECOMPILED-HEADERS) + target_precompile_headers(${self} PRIVATE precomp.hpp) +endif() + install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/editor/events.cpp b/editor/events.cpp index 67a3c63c..7f7561b0 100644 --- a/editor/events.cpp +++ b/editor/events.cpp @@ -1,9 +1,12 @@ #include "app.hpp" + #include "main/floormat-main.hpp" #include "main/floormat-events.hpp" #include "src/world.hpp" -#include <Magnum/Platform/Sdl2Application.h> + #include <utility> + +#include <Magnum/Platform/Sdl2Application.h> #include <Magnum/ImGuiIntegration/Context.hpp> namespace floormat { diff --git a/editor/precomp.hpp b/editor/precomp.hpp new file mode 100644 index 00000000..8c833594 --- /dev/null +++ b/editor/precomp.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "src/precomp.hpp" + +#include <memory> +#include <optional> +#include <filesystem> +#include <vector> + +#include <Corrade/Containers/Pointer.h> +#include <Corrade/Containers/StringStlView.h> +#include <Corrade/Utility/Arguments.h> + +#include <Magnum/Math/Color.h> +#include <Magnum/GL/DefaultFramebuffer.h> +#include <Magnum/GL/Renderer.h> +#include <Magnum/Platform/Sdl2Application.h> +#include <Magnum/ImGuiIntegration/Context.h> diff --git a/editor/update.cpp b/editor/update.cpp index 8247b736..0f723648 100644 --- a/editor/update.cpp +++ b/editor/update.cpp @@ -2,7 +2,6 @@ #include "src/chunk.hpp" #include "main/floormat-events.hpp" #include "main/floormat-main.hpp" -#include <Magnum/Platform/Sdl2Application.h> namespace floormat { diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 77538920..a2d71a61 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,11 +1,12 @@ +set(self ${PROJECT_NAME}-main) file(GLOB sources "*.cpp" CONFIGURE_ARGS) link_libraries(${PROJECT_NAME}) link_libraries(Magnum::Sdl2Application Corrade::Containers Magnum::GL Magnum::Trade) link_libraries(MagnumIntegration::ImGui) -add_library(${PROJECT_NAME}-main STATIC "${sources}") +add_library(${self} STATIC "${sources}") if(FLOORMAT_PRECOMPILED-HEADERS) - target_precompile_headers(${PROJECT_NAME}-main PRIVATE precomp.hpp) + target_precompile_headers(${self} PRIVATE precomp.hpp) endif() diff --git a/main/precomp.hpp b/main/precomp.hpp index bd769578..cff156e7 100644 --- a/main/precomp.hpp +++ b/main/precomp.hpp @@ -2,9 +2,20 @@ #include "src/precomp.hpp" -#include <Corrade/Utility/Arguments.h> #include <Corrade/Utility/DebugStl.h> - #include <Corrade/Containers/String.h> + +#include <Magnum/Math/Vector2.h> +#include <Magnum/Timeline.h> +#include <Magnum/GL/DebugOutput.h> +#include <Magnum/GL/DefaultFramebuffer.h> +#include <Magnum/GL/Framebuffer.h> +#include <Magnum/GL/Renderbuffer.h> #include <Magnum/GL/RenderbufferFormat.h> #include <Magnum/Platform/Sdl2Application.h> + +#include <SDL_keycode.h> +#include <SDL_mouse.h> +#include <SDL_events.h> + +#include <cstdlib> diff --git a/src/precomp.hpp b/src/precomp.hpp index 4ff5d8a7..126643f3 100644 --- a/src/precomp.hpp +++ b/src/precomp.hpp @@ -1,8 +1,6 @@ #pragma once #include "compat/prelude.hpp" -#include "compat/defs.hpp" -#include "compat/assert.hpp" #include <cstddef> #include <cstdint> |