Skip to content

Commit

Permalink
Merged from glfw/master
Browse files Browse the repository at this point in the history
- Fixes for our titlebar stuff and GLFW's new platform API
  • Loading branch information
TheCherno committed Feb 22, 2022
2 parents 62e84ab + 97da62a commit d710a03
Show file tree
Hide file tree
Showing 143 changed files with 18,384 additions and 10,399 deletions.
19 changes: 3 additions & 16 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
image:
- Visual Studio 2015
- Visual Studio 2019
branches:
only:
- ci
- master
- latest
- 3.3-stable
skip_tags: true
environment:
Expand All @@ -21,26 +21,13 @@ environment:
- GENERATOR: Visual Studio 10 2010
BUILD_SHARED_LIBS: OFF
CFLAGS: /WX
- GENERATOR: Visual Studio 16 2019
BUILD_SHARED_LIBS: ON
CFLAGS: /WX
- GENERATOR: Visual Studio 16 2019
BUILD_SHARED_LIBS: OFF
CFLAGS: /WX
matrix:
fast_finish: true
exclude:
- image: Visual Studio 2015
GENERATOR: Visual Studio 16 2019
- image: Visual Studio 2019
GENERATOR: Visual Studio 10 2010
- image: Visual Studio 2019
GENERATOR: MinGW Makefiles
for:
-
matrix:
except:
- GENERATOR: Visual Studio 10 2010
only:
- GENERATOR: MinGW Makefiles
build_script:
- set PATH=%PATH:C:\Program Files\Git\usr\bin=C:\MinGW\bin%
- cmake -S . -B build -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS%
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build
on:
pull_request:
push:
branches: [ ci, master, latest, 3.3-stable ]
permissions:
statuses: write
contents: read

jobs:
build-linux-x11-clang:
name: X11 (Linux, Clang)
runs-on: ubuntu-latest
env:
CC: clang
CFLAGS: -Werror
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev
- name: Configure static library
run: cmake -S . -B build-static
- name: Build static library
run: cmake --build build-static --parallel

- name: Configure shared library
run: cmake -S . -B build-shared -D BUILD_SHARED_LIBS=ON
- name: Build shared library
run: cmake --build build-shared --parallel

build-linux-full-clang:
name: X11+Wayland (Linux, Clang)
runs-on: ubuntu-latest
env:
CC: clang
CFLAGS: -Werror
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev wayland-protocols libwayland-dev libxkbcommon-dev
- name: Configure static library
run: cmake -S . -B build-static -D GLFW_BUILD_WAYLAND=ON
- name: Build static library
run: cmake --build build-static --parallel

- name: Configure shared library
run: cmake -S . -B build-shared -D GLFW_BUILD_WAYLAND=ON -D BUILD_SHARED_LIBS=ON
- name: Build shared library
run: cmake --build build-shared --parallel

build-macos-cocoa-clang:
name: Cocoa (macOS, Clang)
runs-on: macos-latest
env:
CFLAGS: -Werror
MACOSX_DEPLOYMENT_TARGET: 10.8
steps:
- uses: actions/checkout@v2

- name: Configure static library
run: cmake -S . -B build-static
- name: Build static library
run: cmake --build build-static --parallel

- name: Configure shared library
run: cmake -S . -B build-shared -D BUILD_SHARED_LIBS=ON
- name: Build shared library
run: cmake --build build-shared --parallel

build-windows-win32-vs2019:
name: Win32 (Windows, VS2019)
runs-on: windows-latest
env:
CFLAGS: /WX
steps:
- uses: actions/checkout@v2

- name: Configure static library
run: cmake -S . -B build-static -G "Visual Studio 16 2019"
- name: Build static library
run: cmake --build build-static --parallel

- name: Configure shared library
run: cmake -S . -B build-shared -G "Visual Studio 16 2019" -D BUILD_SHARED_LIBS=ON
- name: Build shared library
run: cmake --build build-shared --parallel

7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ src/glfw_config.h
src/glfw3.pc
src/glfw3Config.cmake
src/glfw3ConfigVersion.cmake
src/wayland-pointer-constraints-unstable-v1-client-protocol.h
src/wayland-pointer-constraints-unstable-v1-protocol.c
src/wayland-relative-pointer-unstable-v1-client-protocol.h
src/wayland-relative-pointer-unstable-v1-protocol.c

# Compiled binaries
src/libglfw.so
Expand All @@ -70,6 +66,7 @@ examples/splitview
examples/sharing
examples/triangle-opengl
examples/wave
examples/windows
tests/*.app
tests/*.exe
tests/clipboard
Expand All @@ -80,6 +77,7 @@ tests/gamma
tests/glfwinfo
tests/icon
tests/iconify
tests/inputlag
tests/joysticks
tests/monitors
tests/msaa
Expand All @@ -89,6 +87,7 @@ tests/threads
tests/timeout
tests/title
tests/triangle-vulkan
tests/window
tests/windows

# Hazel-specific
Expand Down
106 changes: 0 additions & 106 deletions .travis.yml

This file was deleted.

19 changes: 17 additions & 2 deletions CMake/GenerateMappings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions CMake/glfw3.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion CMake/modules/FindEpollShim.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
26 changes: 0 additions & 26 deletions CMake/modules/FindWaylandProtocols.cmake

This file was deleted.

34 changes: 0 additions & 34 deletions CMake/modules/FindXKBCommon.cmake

This file was deleted.

Loading

0 comments on commit d710a03

Please sign in to comment.