Skip to content

Commit 085391e

Browse files
[build][cmake] fix issue introduced by #5181 (#5198)
* fix web build issue with CMake introduced by #5181 * remove ASYNCIFY
1 parent fbae395 commit 085391e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ else()
6868
)
6969
endif()
7070

71+
if (${PLATFORM} MATCHES "Web")
72+
target_link_options(raylib PUBLIC "-sUSE_GLFW=3" -sEXPORTED_RUNTIME_METHODS=ccall)
73+
if(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3")
74+
target_link_options(raylib PUBLIC "-sMIN_WEBGL_VERSION=2")
75+
target_link_options(raylib PUBLIC "-sMAX_WEBGL_VERSION=2")
76+
endif()
77+
endif()
78+
7179
set_target_properties(raylib PROPERTIES
7280
PUBLIC_HEADER "${raylib_public_headers}"
7381
VERSION ${PROJECT_VERSION}

0 commit comments

Comments
 (0)