Преглед на файлове

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
pull/2821/head
Hristo Iliev преди 2 години
committed by GitHub
родител
ревизия
387c060006
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. +7
    -1
      src/CMakeLists.txt

+ 7
- 1
src/CMakeLists.txt Целия файл

@ -38,7 +38,9 @@ set(raylib_sources
)
# <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
# also selects the proper graphics API and version for that platform
@ -68,6 +70,10 @@ else()
endif ()
endif()
if (${PLATFORM} MATCHES "Web")
target_link_options(raylib PRIVATE "-sUSE_GLFW=3")
endif()
set_target_properties(raylib PROPERTIES
PUBLIC_HEADER "${raylib_public_headers}"
VERSION ${PROJECT_VERSION}

Зареждане…
Отказ
Запис