From 0e23ba9e5a565e34fee0f024e29ce162f420ec22 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 10 Nov 2022 17:01:30 +0100 Subject: add github action --- test/CMakeLists.txt | 10 +++++++++- test/app.hpp | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'test') 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 #include + +#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(); -- cgit v1.2.3