summaryrefslogtreecommitdiffhomepage
path: root/src/external/glfw/CMake
diff options
context:
space:
mode:
authorRay <[email protected]>2022-08-28 14:16:51 +0200
committerRay <[email protected]>2022-08-28 14:16:51 +0200
commit9e0e08cba495cb8799171c113b55591b46827459 (patch)
tree85a44070caf9dab0a90612695153a0e698b85a89 /src/external/glfw/CMake
parent8508ae3d153159bea374dcfaa08b45095776bd2b (diff)
downloadraylib-9e0e08cba495cb8799171c113b55591b46827459.tar.gz
raylib-9e0e08cba495cb8799171c113b55591b46827459.zip
WARNING: UPDATED GLFW to latest master branch!
WARNING: This could be a BREAKING CHANGE for some platforms! I'm afraid something could be wrong on `rglfw.c` module. To be able to compile on Windows I had to modify `glfw/src/platform.c` line 74. I couldn't manage to compile without that change, help is welcome!
Diffstat (limited to 'src/external/glfw/CMake')
-rw-r--r--src/external/glfw/CMake/GenerateMappings.cmake19
-rw-r--r--src/external/glfw/CMake/MacOSXBundleInfo.plist.in38
-rw-r--r--src/external/glfw/CMake/glfw3.pc.in4
-rw-r--r--src/external/glfw/CMake/modules/FindEpollShim.cmake2
-rw-r--r--src/external/glfw/CMake/modules/FindWaylandProtocols.cmake26
-rw-r--r--src/external/glfw/CMake/modules/FindXKBCommon.cmake34
6 files changed, 20 insertions, 103 deletions
diff --git a/src/external/glfw/CMake/GenerateMappings.cmake b/src/external/glfw/CMake/GenerateMappings.cmake
index 7a88e3d4..c8c9e23f 100644
--- a/src/external/glfw/CMake/GenerateMappings.cmake
+++ b/src/external/glfw/CMake/GenerateMappings.cmake
@@ -23,8 +23,23 @@ endif()
file(STRINGS "${source_path}" lines)
foreach(line ${lines})
- if ("${line}" MATCHES "^[0-9a-fA-F].*$")
- set(GLFW_GAMEPAD_MAPPINGS "${GLFW_GAMEPAD_MAPPINGS}\"${line}\",\n")
+ if (line MATCHES "^[0-9a-fA-F]")
+ if (line MATCHES "platform:Windows")
+ if (GLFW_WIN32_MAPPINGS)
+ string(APPEND GLFW_WIN32_MAPPINGS "\n")
+ endif()
+ string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",")
+ elseif (line MATCHES "platform:Mac OS X")
+ if (GLFW_COCOA_MAPPINGS)
+ string(APPEND GLFW_COCOA_MAPPINGS "\n")
+ endif()
+ string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",")
+ elseif (line MATCHES "platform:Linux")
+ if (GLFW_LINUX_MAPPINGS)
+ string(APPEND GLFW_LINUX_MAPPINGS "\n")
+ endif()
+ string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
+ endif()
endif()
endforeach()
diff --git a/src/external/glfw/CMake/MacOSXBundleInfo.plist.in b/src/external/glfw/CMake/MacOSXBundleInfo.plist.in
deleted file mode 100644
index 684ad790..00000000
--- a/src/external/glfw/CMake/MacOSXBundleInfo.plist.in
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
- <key>CFBundleGetInfoString</key>
- <string>${MACOSX_BUNDLE_INFO_STRING}</string>
- <key>CFBundleIconFile</key>
- <string>${MACOSX_BUNDLE_ICON_FILE}</string>
- <key>CFBundleIdentifier</key>
- <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleLongVersionString</key>
- <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
- <key>CFBundleName</key>
- <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
- <key>CSResourcesFileMapped</key>
- <true/>
- <key>LSRequiresCarbon</key>
- <true/>
- <key>NSHumanReadableCopyright</key>
- <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
- <key>NSHighResolutionCapable</key>
- <true/>
-</dict>
-</plist>
diff --git a/src/external/glfw/CMake/glfw3.pc.in b/src/external/glfw/CMake/glfw3.pc.in
index f74298d4..37f4efd9 100644
--- a/src/external/glfw/CMake/glfw3.pc.in
+++ b/src/external/glfw/CMake/glfw3.pc.in
@@ -7,7 +7,7 @@ Name: GLFW
Description: A multi-platform library for OpenGL, window and input
Version: @GLFW_VERSION@
URL: https://www.glfw.org/
-Requires.private: @GLFW_PKG_DEPS@
+Requires.private: @GLFW_PKG_CONFIG_REQUIRES_PRIVATE@
Libs: -L${libdir} -l@GLFW_LIB_NAME@
-Libs.private: @GLFW_PKG_LIBS@
+Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@
Cflags: -I${includedir}
diff --git a/src/external/glfw/CMake/modules/FindEpollShim.cmake b/src/external/glfw/CMake/modules/FindEpollShim.cmake
index 2facb419..f34d0709 100644
--- a/src/external/glfw/CMake/modules/FindEpollShim.cmake
+++ b/src/external/glfw/CMake/modules/FindEpollShim.cmake
@@ -13,5 +13,5 @@ if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(EPOLLSHIM DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
+find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)
diff --git a/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake b/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake
deleted file mode 100644
index 8eb83f27..00000000
--- a/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-find_package(PkgConfig)
-
-pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION})
-
-execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
- OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR
- RESULT_VARIABLE _pkgconfig_failed)
-if (_pkgconfig_failed)
- message(FATAL_ERROR "Missing wayland-protocols pkgdatadir")
-endif()
-
-string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}")
-
-find_package_handle_standard_args(WaylandProtocols
- FOUND_VAR
- WaylandProtocols_FOUND
- REQUIRED_VARS
- WaylandProtocols_PKGDATADIR
- VERSION_VAR
- WaylandProtocols_VERSION
- HANDLE_COMPONENTS
-)
-
-set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND})
-set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR})
-set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})
diff --git a/src/external/glfw/CMake/modules/FindXKBCommon.cmake b/src/external/glfw/CMake/modules/FindXKBCommon.cmake
deleted file mode 100644
index 0f571eea..00000000
--- a/src/external/glfw/CMake/modules/FindXKBCommon.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-# - Try to find XKBCommon
-# Once done, this will define
-#
-# XKBCOMMON_FOUND - System has XKBCommon
-# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
-# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
-# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
-
-find_package(PkgConfig)
-pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
-set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
-
-find_path(XKBCOMMON_INCLUDE_DIR
- NAMES xkbcommon/xkbcommon.h
- HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
-)
-
-find_library(XKBCOMMON_LIBRARY
- NAMES xkbcommon
- HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
-)
-
-set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
-set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
-set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(XKBCommon DEFAULT_MSG
- XKBCOMMON_LIBRARY
- XKBCOMMON_INCLUDE_DIR
-)
-
-mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)
-