Browse Source

[build][cmake] fix issue introduced by #5181 (#5198)

* fix web build issue with CMake introduced by #5181

* remove ASYNCIFY
pull/5202/head
JohnnyCena123 2 weeks ago
committed by GitHub
parent
commit
085391e788
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/CMakeLists.txt

+ 8
- 0
src/CMakeLists.txt View File

@ -68,6 +68,14 @@ else()
) )
endif() 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 set_target_properties(raylib PROPERTIES
PUBLIC_HEADER "${raylib_public_headers}" PUBLIC_HEADER "${raylib_public_headers}"
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}

Loading…
Cancel
Save