Skip to content

Commit f40e230

Browse files
committed
fix web build issue with CMake introduced by raysan5#5181
1 parent 2a29521 commit f40e230

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 -sASYNCIFY)
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
if (${PLATFORM} MATCHES "Web")
7280
target_link_options(raylib PUBLIC "-sUSE_GLFW=3")
7381
if(${GRAPHICS} MATCHES "GRAPHICS_API_OPENGL_ES3")

0 commit comments

Comments
 (0)