Update GLFW to 3.5.1 (#6051)
* Update GLFW to 3.5.1 * Remove cocoa_time.c from rglfw.c * Add macos_time.c to rglfw.c * Redo changes from pull request #3863 * Makefile: add QuartzCore framework when building for macOS * Add QuartzCore when building for macOS to other build files * Remove unused GLFW dependencies
This commit is contained in:
parent
fba8ea01f5
commit
77353e7f31
108 changed files with 2551 additions and 20167 deletions
|
|
@ -139,6 +139,7 @@ pub fn linkMacOS(b: *std.Build, mod: *std.Build.Module) void {
|
||||||
mod.linkFramework("CoreGraphics", .{});
|
mod.linkFramework("CoreGraphics", .{});
|
||||||
mod.linkFramework("AppKit", .{});
|
mod.linkFramework("AppKit", .{});
|
||||||
mod.linkFramework("IOKit", .{});
|
mod.linkFramework("IOKit", .{});
|
||||||
|
mod.linkFramework("QuartzCore", .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@ foreach (example_source ${example_sources})
|
||||||
target_link_libraries(${example_name} "-framework IOKit")
|
target_link_libraries(${example_name} "-framework IOKit")
|
||||||
target_link_libraries(${example_name} "-framework Cocoa")
|
target_link_libraries(${example_name} "-framework Cocoa")
|
||||||
target_link_libraries(${example_name} "-framework OpenGL")
|
target_link_libraries(${example_name} "-framework OpenGL")
|
||||||
|
target_link_libraries(${example_name} "-framework QuartzCore")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif (${PLATFORM} MATCHES "RGFW")
|
elseif (${PLATFORM} MATCHES "RGFW")
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
*
|
*
|
||||||
* APPLE COMPILATION:
|
* APPLE COMPILATION:
|
||||||
* gcc -o rlgl_standalone rlgl_standalone.c -I../../src -Iexternal/include -Lexternal/lib \
|
* gcc -o rlgl_standalone rlgl_standalone.c -I../../src -Iexternal/include -Lexternal/lib \
|
||||||
* -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa
|
* -lglfw3 -framework CoreVideo -framework OpenGL -framework IOKit -framework Cocoa -framework QuartzCore
|
||||||
* -Wno-deprecated-declarations -std=c99 -DGRAPHICS_API_OPENGL_33
|
* -Wno-deprecated-declarations -std=c99 -DGRAPHICS_API_OPENGL_33
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,5 @@ if (APPLE)
|
||||||
target_link_libraries(${PROJECT_NAME} "-framework IOKit")
|
target_link_libraries(${PROJECT_NAME} "-framework IOKit")
|
||||||
target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
|
target_link_libraries(${PROJECT_NAME} "-framework Cocoa")
|
||||||
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
|
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
|
||||||
|
target_link_libraries(${PROJECT_NAME} "-framework QuartzCore")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
<Add option="-framework IOKit" />
|
<Add option="-framework IOKit" />
|
||||||
<Add option="-framework CoreAudio" />
|
<Add option="-framework CoreAudio" />
|
||||||
<Add option="-framework CoreVideo" />
|
<Add option="-framework CoreVideo" />
|
||||||
|
<Add option="-framework QuartzCore" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="Release (Mac)">
|
<Target title="Release (Mac)">
|
||||||
|
|
@ -44,6 +45,7 @@
|
||||||
<Add option="-framework IOKit" />
|
<Add option="-framework IOKit" />
|
||||||
<Add option="-framework CoreAudio" />
|
<Add option="-framework CoreAudio" />
|
||||||
<Add option="-framework CoreVideo" />
|
<Add option="-framework CoreVideo" />
|
||||||
|
<Add option="-framework QuartzCore" />
|
||||||
</Linker>
|
</Linker>
|
||||||
</Target>
|
</Target>
|
||||||
<Target title="Debug (Linux)">
|
<Target title="Debug (Linux)">
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for OSX 10.9 desktop compiling
|
# Libraries for OSX 10.9 desktop compiling
|
||||||
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
# NOTE: Required packages: libopenal-dev libegl1-mesa-dev
|
||||||
LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa -framework IOKit
|
LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa -framework IOKit -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
# Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,13 @@ OUTPUT_DIR="builds/osx"
|
||||||
COMPILATION_FLAGS="-std=c99 -O2 -flto"
|
COMPILATION_FLAGS="-std=c99 -O2 -flto"
|
||||||
FINAL_COMPILE_FLAGS="-s"
|
FINAL_COMPILE_FLAGS="-s"
|
||||||
WARNING_FLAGS="-Wall -Wextra -Wpedantic"
|
WARNING_FLAGS="-Wall -Wextra -Wpedantic"
|
||||||
LINK_FLAGS="-flto -framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa"
|
LINK_FLAGS="-flto -framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa -framework QuartzCore"
|
||||||
# Debug changes to flags
|
# Debug changes to flags
|
||||||
if [ -n "$BUILD_DEBUG" ]; then
|
if [ -n "$BUILD_DEBUG" ]; then
|
||||||
OUTPUT_DIR="builds-debug/osx"
|
OUTPUT_DIR="builds-debug/osx"
|
||||||
COMPILATION_FLAGS="-std=c99 -O0 -g"
|
COMPILATION_FLAGS="-std=c99 -O0 -g"
|
||||||
FINAL_COMPILE_FLAGS=""
|
FINAL_COMPILE_FLAGS=""
|
||||||
LINK_FLAGS="-framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa"
|
LINK_FLAGS="-framework OpenGL -framework OpenAL -framework IOKit -framework CoreVideo -framework Cocoa -framework QuartzCore"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display what we're doing
|
# Display what we're doing
|
||||||
|
|
|
||||||
|
|
@ -655,7 +655,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
|
||||||
#LDLIBS += -latomic
|
#LDLIBS += -latomic
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
LDLIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
|
LDLIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),BSD)
|
ifeq ($(PLATFORM_OS),BSD)
|
||||||
LDLIBS = -lGL -lpthread
|
LDLIBS = -lGL -lpthread
|
||||||
|
|
@ -707,7 +707,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
|
||||||
ifeq ($(PLATFORM_OS),OSX)
|
ifeq ($(PLATFORM_OS),OSX)
|
||||||
# Libraries for Debian MacOS desktop compiling
|
# Libraries for Debian MacOS desktop compiling
|
||||||
# NOTE: Required packages: libegl1-mesa-dev
|
# NOTE: Required packages: libegl1-mesa-dev
|
||||||
LDLIBS += -lm -framework Foundation -framework AppKit -framework IOKit -framework OpenGL -framework CoreVideo
|
LDLIBS += -lm -framework Foundation -framework AppKit -framework IOKit -framework OpenGL -framework CoreVideo -framework QuartzCore
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
|
||||||
|
|
|
||||||
8
src/external/glfw/CMake/GenerateMappings.cmake
vendored
Normal file → Executable file
8
src/external/glfw/CMake/GenerateMappings.cmake
vendored
Normal file → Executable file
|
|
@ -1,6 +1,8 @@
|
||||||
# Usage:
|
# Usage:
|
||||||
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
|
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
|
||||||
|
|
||||||
|
cmake_policy(VERSION 3.16)
|
||||||
|
|
||||||
set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
|
set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
|
||||||
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
|
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
|
||||||
set(template_path "${CMAKE_ARGV3}")
|
set(template_path "${CMAKE_ARGV3}")
|
||||||
|
|
@ -22,8 +24,9 @@ if (status_code)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(STRINGS "${source_path}" lines)
|
file(STRINGS "${source_path}" lines)
|
||||||
foreach(line ${lines})
|
list(FILTER lines INCLUDE REGEX "^[0-9a-fA-F]")
|
||||||
if (line MATCHES "^[0-9a-fA-F]")
|
|
||||||
|
foreach(line IN LISTS lines)
|
||||||
if (line MATCHES "platform:Windows")
|
if (line MATCHES "platform:Windows")
|
||||||
if (GLFW_WIN32_MAPPINGS)
|
if (GLFW_WIN32_MAPPINGS)
|
||||||
string(APPEND GLFW_WIN32_MAPPINGS "\n")
|
string(APPEND GLFW_WIN32_MAPPINGS "\n")
|
||||||
|
|
@ -40,7 +43,6 @@ foreach(line ${lines})
|
||||||
endif()
|
endif()
|
||||||
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
|
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
|
configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
|
||||||
|
|
|
||||||
0
src/external/glfw/CMake/Info.plist.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/Info.plist.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/cmake_uninstall.cmake.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/cmake_uninstall.cmake.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/glfw3.pc.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/glfw3.pc.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/glfw3Config.cmake.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/glfw3Config.cmake.in
vendored
Normal file → Executable file
0
src/external/glfw/CMake/i686-w64-mingw32-clang.cmake
vendored
Normal file → Executable file
0
src/external/glfw/CMake/i686-w64-mingw32-clang.cmake
vendored
Normal file → Executable file
0
src/external/glfw/CMake/i686-w64-mingw32.cmake
vendored
Normal file → Executable file
0
src/external/glfw/CMake/i686-w64-mingw32.cmake
vendored
Normal file → Executable file
0
src/external/glfw/CMake/modules/FindEpollShim.cmake
vendored
Normal file → Executable file
0
src/external/glfw/CMake/modules/FindEpollShim.cmake
vendored
Normal file → Executable file
18
src/external/glfw/CMake/modules/FindOSMesa.cmake
vendored
18
src/external/glfw/CMake/modules/FindOSMesa.cmake
vendored
|
|
@ -1,18 +0,0 @@
|
||||||
# Try to find OSMesa on a Unix system
|
|
||||||
#
|
|
||||||
# This will define:
|
|
||||||
#
|
|
||||||
# OSMESA_LIBRARIES - Link these to use OSMesa
|
|
||||||
# OSMESA_INCLUDE_DIR - Include directory for OSMesa
|
|
||||||
#
|
|
||||||
# Copyright (c) 2014 Brandon Schaefer <brandon.schaefer@canonical.com>
|
|
||||||
|
|
||||||
if (NOT WIN32)
|
|
||||||
|
|
||||||
find_package (PkgConfig)
|
|
||||||
pkg_check_modules (PKG_OSMESA QUIET osmesa)
|
|
||||||
|
|
||||||
set (OSMESA_INCLUDE_DIR ${PKG_OSMESA_INCLUDE_DIRS})
|
|
||||||
set (OSMESA_LIBRARIES ${PKG_OSMESA_LIBRARIES})
|
|
||||||
|
|
||||||
endif ()
|
|
||||||
0
src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake
vendored
Normal file → Executable file
0
src/external/glfw/CMake/x86_64-w64-mingw32-clang.cmake
vendored
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue