Add minimal http server for emscripten test apps

This commit is contained in:
Anonymous Maarten
2023-08-09 19:05:56 +02:00
committed by Anonymous Maarten
parent 8e898c4a21
commit 64d570f027
2 changed files with 73 additions and 0 deletions

View File

@@ -302,6 +302,12 @@ if(OPENGL_FOUND)
endif()
if(EMSCRIPTEN)
set_property(TARGET testshader APPEND_STRING PROPERTY LINK_FLAGS " -sLEGACY_GL_EMULATION")
find_package(Python3 COMPONENTS Interpreter)
if(TARGET Python3::Interpreter)
add_custom_target(serve-sdl-tests
COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/emscripten/server.py" -d "${CMAKE_CURRENT_BINARY_DIR}")
endif()
endif()
if(PSP)