Fix an issue when compiling for web (#2820)
It would try to use the glfw on the system but we're cross-compiling for web where the implementation is provided by emscripten's team
This commit is contained in:
parent
0b6d4b376f
commit
387c060006
1 changed files with 7 additions and 1 deletions
|
@ -38,7 +38,9 @@ set(raylib_sources
|
||||||
)
|
)
|
||||||
|
|
||||||
# <root>/cmake/GlfwImport.cmake handles the details around the inclusion of glfw
|
# <root>/cmake/GlfwImport.cmake handles the details around the inclusion of glfw
|
||||||
include(GlfwImport)
|
if (NOT ${PLATFORM} MATCHES "Web")
|
||||||
|
include(GlfwImport)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# Sets additional platform options and link libraries for each platform
|
# Sets additional platform options and link libraries for each platform
|
||||||
# also selects the proper graphics API and version for that platform
|
# also selects the proper graphics API and version for that platform
|
||||||
|
@ -68,6 +70,10 @@ else()
|
||||||
endif ()
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (${PLATFORM} MATCHES "Web")
|
||||||
|
target_link_options(raylib PRIVATE "-sUSE_GLFW=3")
|
||||||
|
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…
Add table
Add a link
Reference in a new issue