Sync with upstream GLFW pull request

The GLFW tree distributed with raylib has two modifications:

- GLFW_PKG_{DEPS,LIBS} are exported to PARENT_SCOPE, so we can use them
  in our pkg-config file
- An intermediary glfw_objlib target is added, so we can reexport GLFW
  symbols from libraylib.a

rglfw can fix the second point, but for Wayland usage, we would have to
replicate protocol generation, so we just leverage GLFW's existing
support instead.

To make maintenance easier, I have submitted a pull request for
including these modifications to upstream GLFW.
And to make that one easier, this patch dog-foods the modifications,
so raylib users can help find regressions. :-)

glfw/glfw#1307
This commit is contained in:
Ahmad Fatoum
2018-07-29 22:42:10 +02:00
parent 7154a83313
commit 286c41af52
3 changed files with 12 additions and 11 deletions

View File

@ -33,12 +33,8 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL " " FORCE)
set(GLFW_USE_WAYLAND ${USE_WAYLAND} CACHE BOOL "" FORCE)
if (WITH_PIC OR SHARED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
add_subdirectory(external/glfw)
include_directories(BEFORE SYSTEM external/glfw/include)
list(APPEND raylib_sources $<TARGET_OBJECTS:glfw_objlib>)
else()