diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 17:01:30 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 22:17:43 +0100 |
commit | 0e23ba9e5a565e34fee0f024e29ce162f420ec22 (patch) | |
tree | eeaf0ec198ba8849117c9c21675a651e8c93acad /test | |
parent | 67f0ff04d0fb71255d35bf7f31a684d7a2120c2a (diff) |
add github action
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 10 | ||||
-rw-r--r-- | test/app.hpp | 11 |
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(); |