mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-09 03:16:27 +00:00
[build][cmake] Review web compilation system (#5181)
* [cmake] export automatically raylib definitions and compile/link options * [cmake] pass emscripten options to consumer project * [web] compile for web * [web] canvas width 100%
This commit is contained in:
@@ -68,14 +68,6 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if (${PLATFORM} MATCHES "Web")
|
||||
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")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(raylib PROPERTIES
|
||||
PUBLIC_HEADER "${raylib_public_headers}"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
|
@@ -34,7 +34,7 @@
|
||||
<link rel="shortcut icon" href="https://www.raylib.com/favicon.ico">
|
||||
|
||||
<style>
|
||||
body { font-family: arial; margin: 0; padding: none; }
|
||||
body { font-family: arial; margin: 0; padding: unset; }
|
||||
|
||||
#header {
|
||||
width: 100%;
|
||||
|
Reference in New Issue
Block a user