diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 13:43:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-12 17:47:30 +0100 |
commit | d481edb3619e251285c238c05f47a121ecd96df7 (patch) | |
tree | ff81314fbcb75ad1272285b827b6c2e8f3ac694e /test | |
parent | 58bf715b7932be0e6e611cbde0c6aa6fe82a6f70 (diff) |
cmake: add targets for loader, serialize, draw
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 11 | ||||
-rw-r--r-- | test/json.cpp | 2 | ||||
-rw-r--r-- | test/main.cpp | 3 | ||||
-rw-r--r-- | test/precomp.hpp | 13 | ||||
-rw-r--r-- | test/serializer.cpp | 2 |
5 files changed, 23 insertions, 8 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 71b9ed93..d7d202dc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,10 +1,10 @@ -set(self "${PROJECT_NAME}-test") -file(GLOB sources "*.cpp" "../loader/*.cpp" CONFIGURE_ARGS) +set(self floormat-test) +file(GLOB sources "*.cpp" CONFIGURE_ARGS) file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") -link_libraries(${PROJECT_NAME}) -link_libraries(Magnum::Trade) +link_libraries(Magnum::GL Magnum::Trade) +link_libraries(floormat-loader floormat-serialize floormat) if(APPLE) link_libraries(Magnum::WindowlessCglApplication) @@ -16,4 +16,7 @@ else() endif() add_executable(${self} "${sources}") +if(FLOORMAT_PRECOMPILED-HEADERS) + target_precompile_headers(${self} PRIVATE precomp.hpp) +endif() install(TARGETS ${self} RUNTIME DESTINATION bin) diff --git a/test/json.cpp b/test/json.cpp index fa4564fd..b5caf145 100644 --- a/test/json.cpp +++ b/test/json.cpp @@ -7,7 +7,7 @@ #include "tile-atlas.hpp" #include "tile.hpp" #include "chunk.hpp" -#include "loader.hpp" +#include "loader/loader.hpp" #include <Corrade/Containers/StringView.h> #include <Corrade/Utility/Path.h> diff --git a/test/main.cpp b/test/main.cpp index f09768a9..d20d5d26 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -1,5 +1,5 @@ #include "app.hpp" -#include "loader.hpp" +#include "loader/loader.hpp" namespace floormat { @@ -33,4 +33,3 @@ int main(int argc, char** argv) floormat::floormat application{{argc, argv}}; return application.exec(); } - diff --git a/test/precomp.hpp b/test/precomp.hpp new file mode 100644 index 00000000..c183dcc0 --- /dev/null +++ b/test/precomp.hpp @@ -0,0 +1,13 @@ +#pragma once +#include "../src/precomp.hpp" + +#if 0 +#ifdef __APPLE__ +#include <Magnum/Platform/WindowlessCglApplication.h> +#elif defined _WIN32 +#include <Magnum/Platform/WindowlessWglApplication.h> +#else +#include <Magnum/Platform/WindowlessGlxApplication.h> +#endif +#endif +#include <Magnum/Platform/GLContext.h> diff --git a/test/serializer.cpp b/test/serializer.cpp index c1ab5fef..0625f294 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -1,6 +1,6 @@ #include "app.hpp" #include "src/world.hpp" -#include "src/loader.hpp" +#include "loader/loader.hpp" #include "src/tile-atlas.hpp" #include <Corrade/Utility/Path.h> |