summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt11
-rw-r--r--test/json.cpp2
-rw-r--r--test/main.cpp3
-rw-r--r--test/precomp.hpp13
-rw-r--r--test/serializer.cpp2
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>