diff --git a/src/Magnum/Platform/Test/CMakeLists.txt b/src/Magnum/Platform/Test/CMakeLists.txt index 82f5128b7..e06c6f4a9 100644 --- a/src/Magnum/Platform/Test/CMakeLists.txt +++ b/src/Magnum/Platform/Test/CMakeLists.txt @@ -51,7 +51,14 @@ if(WITH_SDL2APPLICATION) add_executable(PlatformSdl2ApplicationTest Sdl2ApplicationTest.cpp) target_link_libraries(PlatformSdl2ApplicationTest PRIVATE MagnumSdl2Application) set_target_properties(PlatformSdl2ApplicationTest PROPERTIES FOLDER "Magnum/Platform/Test") - if(CORRADE_TARGET_IOS) + if(CORRADE_TARGET_EMSCRIPTEN) + # So we can spin up a webserver in the build dir for easy testing + file(COPY + ../EmscriptenApplication.js + ../WebApplication.css + Sdl2ApplicationTest.html + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + elseif(CORRADE_TARGET_IOS) set_target_properties(PlatformSdl2ApplicationTest PROPERTIES MACOSX_BUNDLE ON XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES") @@ -74,6 +81,14 @@ if(WITH_WINDOWLESSEGLAPPLICATION) add_executable(PlatformWindowlessEglApplicationTest WindowlessEglApplicationTest.cpp) target_link_libraries(PlatformWindowlessEglApplicationTest PRIVATE MagnumWindowlessEglApplication) set_target_properties(PlatformWindowlessEglApplicationTest PROPERTIES FOLDER "Magnum/Platform/Test") + if(CORRADE_TARGET_EMSCRIPTEN) + # So we can spin up a webserver in the build dir for easy testing + file(COPY + ../WindowlessEmscriptenApplication.js + ../WebApplication.css + WindowlessEglApplicationTest.html + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + endif() endif() if(WITH_WINDOWLESSGLXAPPLICATION) diff --git a/src/Magnum/Platform/Test/Sdl2ApplicationTest.html b/src/Magnum/Platform/Test/Sdl2ApplicationTest.html new file mode 100644 index 000000000..c65d07ca3 --- /dev/null +++ b/src/Magnum/Platform/Test/Sdl2ApplicationTest.html @@ -0,0 +1,18 @@ + + +
+ +