diff options
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | draw/CMakeLists.txt | 3 | ||||
-rw-r--r-- | draw/precomp.hpp | 2 | ||||
-rw-r--r-- | main/CMakeLists.txt | 4 | ||||
-rw-r--r-- | main/precomp.hpp | 3 | ||||
-rw-r--r-- | src/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/precomp.hpp | 27 |
7 files changed, 45 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7141c38c..56327efe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,9 @@ if(CMAKE_BUILD_TYPE STREQUAL "") endif() string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE) +set(FLOORMAT_PRECOMPILED-HEADERS ON CACHE BOOL + "Use precompiled headers while building the floormat.") + function(sets type) set(i 0) list(LENGTH ARGN max) diff --git a/draw/CMakeLists.txt b/draw/CMakeLists.txt index 9dd2e869..a76cecbf 100644 --- a/draw/CMakeLists.txt +++ b/draw/CMakeLists.txt @@ -7,3 +7,6 @@ target_link_libraries(${self} PUBLIC Magnum::Shaders ${PROJECT_NAME} ) +if(FLOORMAT_PRECOMPILED-HEADERS) + target_precompile_headers(${self} PRIVATE precomp.hpp) +endif() diff --git a/draw/precomp.hpp b/draw/precomp.hpp new file mode 100644 index 00000000..e81a58f0 --- /dev/null +++ b/draw/precomp.hpp @@ -0,0 +1,2 @@ +#pragma once +#include "src/precomp.hpp" diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 9780ad4c..617c78aa 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -14,3 +14,7 @@ endif() add_executable(${self} "${sources}" "${res}") set_property(TARGET ${self} PROPERTY OUTPUT_NAME "${PROJECT_NAME}") install(TARGETS ${self} RUNTIME DESTINATION bin) + +if(FLOORMAT_PRECOMPILED-HEADERS) + target_precompile_headers(${self} PRIVATE precomp.hpp) +endif() diff --git a/main/precomp.hpp b/main/precomp.hpp new file mode 100644 index 00000000..b38f46f9 --- /dev/null +++ b/main/precomp.hpp @@ -0,0 +1,3 @@ +#pragma once +#include "src/precomp.hpp" +#include "app.hpp" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e443a9df..13b7d1ca 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,5 +8,6 @@ target_link_libraries( Magnum::Shaders nlohmann_json::nlohmann_json ) -target_include_directories(${self} PRIVATE ${GLM_INCLUDE_DIRS}) -target_include_directories(${self} PRIVATE magnum-integration/src) +if(FLOORMAT_PRECOMPILED-HEADERS) + target_precompile_headers(${self} PRIVATE precomp.hpp) +endif() diff --git a/src/precomp.hpp b/src/precomp.hpp new file mode 100644 index 00000000..2a19a1b7 --- /dev/null +++ b/src/precomp.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "compat/prelude.hpp" +#include "compat/defs.hpp" +#include "compat/assert.hpp" +#include "src/tile-defs.hpp" +#include "src/tile.hpp" +#include "src/tile-atlas.hpp" +#include "src/tile-iterator.hpp" +#include "src/chunk.hpp" +#include "src/global-coords.hpp" +#include "shaders/tile-shader.hpp" +#include "serialize/json-helper.hpp" +#include <cstddef> +#include <type_traits> +#include <cmath> +#include <array> +#include <optional> +#include <limits> +#include <tuple> +#include <utility> +#include <filesystem> +#include <Magnum/Magnum.h> +#include <Magnum/Math/Vector2.h> +#include <Magnum/Math/Vector3.h> +#include <Magnum/Math/Vector4.h> +#include <nlohmann/json.hpp> |