Commit Graph

268 Commits

Author SHA1 Message Date
Camilla Löwy
554f5d0492 Wayland: Require xkbcommon 0.5.0 or greater
The Wayland backend now requires xkbcommon-compose, which was added in
version 0.5.0.  xkbcommon 0.5.0 was released in 2014.

This removes the non-composing fallback path for text input.

(cherry picked from commit 293d19a153)
2022-02-15 21:20:28 +01:00
Camilla Löwy
869e68a015 Start 3.3.7 2021-12-10 01:26:54 +01:00
Camilla Löwy
19543afbfb Start 3.3.6 2021-10-28 22:16:41 +02:00
Camilla Löwy
c113c59926 Raise maximum known CMake version to 3.20
This has seemed to work well on all platforms for a while.

(cherry picked from commit d7b7c3b12a)
2021-08-27 17:21:27 +02:00
Camilla Löwy
123643df2d Remove unneccessary quotes in CMake conditions
(cherry picked from commit 87d5646f5d)
2021-08-27 17:16:56 +02:00
Camilla Löwy
ab5f006cff Update comment for msvcrt CMake option
(cherry picked from commit 9a0e88a016)
2021-08-27 17:14:15 +02:00
Camilla Löwy
658744e222 Update USE_MSVC_RUNTIME_LIBRARY_DLL for CMake 3.15
This makes USE_MSVC_RUNTIME_LIBRARY_DLL update the directory scope
CMAKE_MSVC_RUNTIME_LIBRARY variable instead of CMAKE_C_FLAGS on CMake
3.15 and later.

Solution proposed by @moritz-h.

Fixes #1783.
Closes #1796.

(cherry picked from commit f4a7329604)
2021-06-09 18:24:31 +02:00
Camilla Löwy
713711f5e9 Start 3.3.5 2021-04-08 20:48:17 +02:00
Camilla Löwy
b8202d9ca3 Start 3.3.4 2021-02-23 21:23:46 +01:00
Camilla Löwy
92f80daf4a Support interprocedural optimization override
This policy applies the CMAKE_INTERPROCEDURAL_OPTIMIZATION override to
the GLFW target.

Fixes #1753.

(cherry picked from commit 9d7897f961)
2020-09-02 22:29:59 +02:00
Camilla Löwy
d7b67a2eb4 Fix MinGW linker flag tests breaking later tests
(cherry picked from commit cfc23cd087)
2020-06-30 17:04:44 +02:00
Camilla Löwy
c4b4476d78 Wayland: Remove unused link-time dependency
The wayland-egl library is now loaded dynamically at init.  This narrows
the pkgconfig dependencies to the link-time depdendencies.

(cherry picked from commit 6aca3e99f0)
2020-04-03 17:01:22 +02:00
Camilla Löwy
64c7aa50d0 Start 3.3.3 2020-02-13 22:01:33 +01:00
Camilla Löwy
d33084447d Cocoa: Select Vulkan surface extension at runtime
This mostly just follows the pattern established by X11.

Related to #1619.

(cherry picked from commit 15d91801b7)
2020-01-17 15:40:48 +01:00
ByunghoonKim
50f3979dfd Cocoa: Add support for VK_EXT_metal_surface
This adds optional support for the VK_EXT_metal_surface instance
extension.

Closes #1619.

(cherry picked from commit c5cb4a253a)
2020-01-17 15:38:54 +01:00
Camilla Löwy
0938462616 Start 3.3.2 2020-01-05 14:50:14 +01:00
Camilla Löwy
9fc5fd1375 Cocoa: Replace display link with IOKit query
This removes the final dependency on CoreVideo, using a display link to
get the refresh rate of monitors where Core Graphics report a refresh
rate of zero.  Instead we now query the I/O registry directly, similarly
to what the display link does at creation.

Thanks to @OneSadCookie for pointers to this solution.

(cherry picked from commit 4ec7daf3e9)
2019-12-31 23:10:11 +01:00
Camilla Löwy
365321a9af Add dependency name hints to CMake error messages
Fixes #1605.

(cherry picked from commit a43f545677)
2019-12-19 06:49:44 +01:00
Camilla Löwy
5416e347ad Enable CMake policy CMP0077 where available
This will let higher-level projects override GLFW CMake options with
normal variables instead of having to use cache variables.

This means with CMake 3.13 and later you can now do:

set(GLFW_BUILD_TESTS ON)
add_subdirectory(path/to/glfw)

Instead of the more verbose:

set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/glfw)

(cherry picked from commit 71e6ff386d)
2019-05-27 16:34:40 +02:00
Camilla Löwy
b383e70021 X11: Fix CMake check for XInput headers
The X11_Xinput_* variables have been removed in recent CMake, leaving
only the X11_Xi_* set.

Related to #1480.

(cherry picked from commit ceb16cb5f1)
2019-05-19 18:32:13 +02:00
Camilla Löwy
b596c79014 Use CMakeDependentOption for dependent options
This replaces the earlier manual logic for dependent CMake options with
the cmake_dependent_option function from CMakeDependentOption.

(cherry picked from commit cd290f767f)
2019-05-19 18:31:30 +02:00
Camilla Löwy
bc8b567d7c Move to the modern CMake project version option
This replaces the manual ad-hoc version variables we have used since
CMake 2.x (and GLFW 2.x lite).

(cherry picked from commit a255e7ace6)
2019-05-19 18:30:58 +02:00
Camilla Löwy
37cc51b823 X11: Only check for headers at build time
GLFW does not require the X11 extension libraries to build or run, so
only fail if the headers are unavailable.

(cherry picked from commit 5c5963f1c0)
2019-05-19 18:27:33 +02:00
Camilla Löwy
9cc83cf07f X11: Fix CMake not checking for XInput2 headers
Fixes #1480.

(cherry picked from commit 090b16bfae)
2019-05-19 18:27:06 +02:00
Camilla Löwy
a9343d641c Start 3.3.1 2019-04-16 14:48:16 +02:00
Camilla Löwy
bd23be2594 Add pkgconfig dependency for GLFW_VULKAN_STATIC 2019-04-15 02:46:07 +02:00
Camilla Löwy
d7e30b1c74 Replace glad and the Vulkan SDK with glad2
This removes all dependencies from the GLFW test programs on the Vulkan
SDK.

It also removes support for linking the GLFW shared library (dynamic
library, DLL) against the Vulkan loader static library.
2019-04-15 02:45:48 +02:00
Rolf Eike Beer
f9923e9095 Use GNUInstallDirs for install destinations
This has the advantage that the user may override e.g. the include
location, and the correct libdir (lib, lib64, lib/something) is
automatically determined.

Closes #1367.
2018-12-03 19:28:31 +01:00
Rolf Eike Beer
df7f36a316 Simplify check for CMake policy CMP0054
Related to #1367.
2018-12-03 19:25:41 +01:00
Emmanuel Gil Peyrot
cc805c0963 Mir: Remove this experimental backend
As of the release of Mir 1.0, libmirclient has been deprecated[1] and
its developers recommend clients using it to switch to Wayland.  This
patch removes support for libmirclient and instruct users to use the
experimental Wayland backend instead.

[1] https://discourse.ubuntu.com/t/mir-news-28th-september-2018/8184
2018-10-05 11:59:26 +02:00
Emmanuel Gil Peyrot
dcd2a19d90 Wayland: Add support for xdg-decoration
This allows compositors which prefer to draw the decorations around
clients to do so, rather than letting GLFW draw its own decorations.
The appearance is thus entirely subject to the compositor used, but
should generally be better than the current solid colour decorations we
have, which we continue to use when the compositor doesn’t support this
protocol or tells us to draw the decorations ourselves.

This new protocol has been tested against wlroots’s rootston compositor.

Fixes #1257.
2018-10-01 16:37:24 +02:00
Emmanuel Gil Peyrot
3e884aea46 Wayland: Use memfd_create() and seals if available
This allows the compositor to avoid having to setup and teardown a
SIGBUS signal handler whenever it needs to read from this surface, as it
knows we won’t be able to shrink the file and so doesn’t have to protect
against that.

This codepath will only be used on Linux ≥ 3.17 with glibc ≥ 2.27, and
possibly other kernels and libc.  The former code will continue to be
used as a fallback, either if memfd_create() fails or if it isn’t
available.
2018-10-01 13:13:19 +02:00
Camilla Löwy
474fa73e6c Update minimum required CMake version to 3.0
Fixes #1244.
2018-04-09 00:04:29 +02:00
Greg V
0a3c4f5d80 Add support for Wayland on FreeBSD and other OSes 2018-03-27 22:03:37 +02:00
Camilla Löwy
ab3bfb4205 Cocoa: Update MoltenVK support for LunarG SDK
GLFW now checks for the libvulkan.1.dylib loader instead of what is now
the ICD.  This removes checking for libMoltenVK.dylib to avoid cryptic
errors.  This unfortunately also breaks compatibility with the
standalone MoltenVK SDK.

This also removes support for the static loader library as that is not
present in the LunarG SDK.

Related to #870.
2018-03-01 21:45:46 +01:00
Emmanuel Gil Peyrot
94c7aa0d67 Bump wayland-protocols to 1.12 2018-01-29 03:59:47 +01:00
Camilla Löwy
bb3ab87a18 Remove unmaintained internal Doxygen docs
The useful bits have been transformed to function definition comments.
The style guide stub has been added to the regular docs build.
2018-01-17 11:25:32 +01:00
Emmanuel Gil Peyrot
09e0714284 Bump wayland-protocols version for idle-inhibit
This prevents GLFW from building when wayland-protocols is too old.
2017-12-20 04:53:41 +01:00
Emmanuel Gil Peyrot
d18431338a Wayland: Disable the compose key on old xkbcommon 2017-11-20 18:24:30 +01:00
Emmanuel Gil Peyrot
25cf67667f Wayland: Tell cmake which libraries to use 2017-11-20 18:06:29 +01:00
Camilla Löwy
aef4edadd0 Move uninstall target to GLFW3 folder
Fixes #1129.
2017-11-15 13:58:27 +01:00
Emmanuel Gil Peyrot
a7a70cf34d Wayland: Add dynamic loading of libxkbcommon 2017-10-30 12:01:17 +00:00
Camilla Löwy
0882fffc37 Fix missing CMake file path quoting 2017-08-20 14:47:44 +02:00
Camilla Löwy
ac01da6953 Cleanup 2017-08-16 21:00:10 +02:00
Camilla Löwy
99e72830ea X11: Add dynamic loading of libXcursor 2017-08-16 20:59:59 +02:00
Camilla Löwy
3f852c321f X11: Add dynamic loading of libXinerama 2017-08-16 20:06:22 +02:00
Camilla Löwy
15d102b75e X11: Add dynamic loading of libXrandr 2017-08-16 20:05:55 +02:00
Arkady Shapkin
d6fcbdc38b Move CMAKE_LEGACY_CYGWIN_WIN32 to its proper place
Closes #1006.
2017-05-07 02:19:32 +02:00
Brandon Schaefer
c9003b5547 Mir: Get ready for Mir 1.0
Clean up CMake finding and check version.  Change last remaining
deprecations.

Closes #979.
2017-03-30 00:43:03 +02:00
Camilla Löwy
6d9a58bfef Add glfwInitHint
This allows setting hints that control how the library is initialized,
transforming more compile-time options into run-time ones.
2017-03-01 04:35:41 +01:00