From 085391e788f91735b795c61898dafe028e3b6a47 Mon Sep 17 00:00:00 2001 From: JohnnyCena123 Date: Tue, 23 Sep 2025 19:04:30 +0300 Subject: [PATCH] [build][cmake] fix issue introduced by #5181 (#5198) * fix web build issue with CMake introduced by #5181 * remove ASYNCIFY --- src/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f31c4e578..087141447 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -68,6 +68,14 @@ else() ) endif() +if (${PLATFORM} MATCHES "Web") + target_link_options(raylib PUBLIC "-sUSE_GLFW=3" -sEXPORTED_RUNTIME_METHODS=ccall) + 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") + endif() +endif() + set_target_properties(raylib PROPERTIES PUBLIC_HEADER "${raylib_public_headers}" VERSION ${PROJECT_VERSION}