diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-02 19:03:32 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-02 20:25:31 +0100 |
commit | 5a95eb1282e30bd803d7e0b352a8443795842e42 (patch) | |
tree | c97bc43e4d5107a427817c65aa1b0c2eeb64a427 /src | |
parent | 0fe5336b9a53f20817f54be0bd7cd935db14914c (diff) |
fix build with Linux and/or GCC
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/random.cpp | 2 | ||||
-rw-r--r-- | src/tile-atlas.hpp | 2 | ||||
-rw-r--r-- | src/tile.hpp | 2 | ||||
-rw-r--r-- | src/world.hpp | 2 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9c4ac952..85e6bf5b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,10 +6,15 @@ target_link_libraries( Magnum::GL Magnum::Magnum Magnum::Shaders - Magnum::AnyImageImporter - Magnum::TgaImporter nlohmann_json::nlohmann_json ) if(FLOORMAT_PRECOMPILED-HEADERS) target_precompile_headers(${self} PRIVATE precomp.hpp) endif() + +if(WIN32 OR MAGNUM_BUILD_STATIC) + target_link_libraries(${self} PUBLIC + Magnum::AnyImageImporter + Magnum::TgaImporter + ) +endif() diff --git a/src/random.cpp b/src/random.cpp index 4da534a3..d3e45292 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -18,7 +18,7 @@ std::size_t random_engine_impl::operator()() if constexpr(sizeof(std::size_t) > sizeof(std::uint32_t)) { constexpr std::size_t N = (sizeof(std::size_t) + sizeof(std::uint32_t)-1) / sizeof(std::uint32_t); - static_assert(N >= 2); + static_assert(N >= 1); union { std::size_t x; std::uint32_t a[N]; diff --git a/src/tile-atlas.hpp b/src/tile-atlas.hpp index b46cf686..026d2073 100644 --- a/src/tile-atlas.hpp +++ b/src/tile-atlas.hpp @@ -5,8 +5,6 @@ #include <array> #include <memory> -namespace std::filesystem { class path; } - namespace floormat { struct tile_atlas final diff --git a/src/tile.hpp b/src/tile.hpp index ab55ca11..b7bacc8d 100644 --- a/src/tile.hpp +++ b/src/tile.hpp @@ -25,7 +25,7 @@ struct tile_proto final { std::shared_ptr<tile_atlas> ground_atlas, wall_north_atlas, wall_west_atlas; variant_t ground_variant = 0, wall_north_variant = 0, wall_west_variant = 0; - pass_mode pass_mode = pass_mode::pass_shoot_through; + enum pass_mode pass_mode = pass_mode::pass_shoot_through; tile_image_proto ground_image() const noexcept; tile_image_proto wall_north_image() const noexcept; diff --git a/src/world.hpp b/src/world.hpp index 9b58ff3d..195d4903 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -6,8 +6,6 @@ #include <unordered_map> #include <memory> -namespace std::filesystem { class path; } - namespace floormat { struct world final |