summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt10
-rw-r--r--test/app.hpp11
2 files changed, 19 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0ef13ac6..0f5ca85d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -4,7 +4,15 @@ file(GLOB sources "*.cpp" CONFIGURE_ARGS)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test")
link_libraries(${PROJECT_NAME})
-link_libraries(Magnum::WindowlessWglApplication Magnum::Trade)
+link_libraries(Magnum::Trade)
+
+if(APPLE)
+ link_libraries(Magnum::WindowlessCglApplication)
+elseif(WIN32)
+ link_libraries(Magnum::WindowlessWglApplication)
+else()
+ link_libraries(Magnum::WindowlessGlxApplication)
+endif()
add_executable(${self} "${sources}" "../loader/loader-impl.cpp")
install(TARGETS ${self} RUNTIME DESTINATION bin)
diff --git a/test/app.hpp b/test/app.hpp
index 31df8a35..c9bcfcee 100644
--- a/test/app.hpp
+++ b/test/app.hpp
@@ -1,8 +1,17 @@
#pragma once
#include <Magnum/Magnum.h>
#include <Magnum/Platform/WindowlessWglApplication.h>
+
+#ifdef __APPLE__
+#define FM_APPLICATION Platform::WindowlessCglApplication
+#elif defined _WIN32
+#define FM_APPLICATION Platform::WindowlessWglApplication
+#else
+#define FM_APPLICATION Platform::WindowlessGlxApplication
+#endif
+
namespace floormat {
-struct floormat final : Platform::WindowlessWglApplication // NOLINT(cppcoreguidelines-virtual-class-destructor)
+struct floormat final : private FM_APPLICATION
{
explicit floormat(const Arguments& arguments);
~floormat();