[build][cmake] Added emscripten build options (#5180)

* [cmake] export automatically raylib definitions and compile/link options

* [cmake] pass emscripten options to consumer project
This commit is contained in:
Bruno Cabral
2025-09-12 12:42:50 -07:00
committed by GitHub
parent 7db5f56e81
commit 71321d179b
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ else()
endif()
if (${PLATFORM} MATCHES "Web")
target_link_options(raylib PUBLIC "-sUSE_GLFW=3")
target_link_options(raylib PUBLIC "-sUSE_GLFW=3" -sEXPORTED_RUNTIME_METHODS=ccall -sASYNCIFY)
if(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3")
target_link_options(raylib PUBLIC "-sMIN_WEBGL_VERSION=2")
target_link_options(raylib PUBLIC "-sMAX_WEBGL_VERSION=2")