This adds the GLFW_LIBRARY_TYPE CMake cache variable, which allows users
and higher-level projects to set what type of library GLFW is built as.
When not empty, this value overrides the standard BUILD_SHARED_LIBS
option for GLFW while still allowing it to control the type of other
libraries in a larger project.
This also allows building GLFW as an object library without adding dummy
source files (as required by Xcode) or producing unused library
binaries.
Projects using CMake 3.12 or later can link the resulting GLFW object
library normally using target_link_libraries.
Fixes#279.
Related to #1307.
Closes#1497.
Closes#1574.
Closes#1928.
The insight to use wayland.xml to resolve the difficult-to-redirect
interface symbols was gleaned from SDL.
Instead of compiling the code output of wayland-scanner separately it is
made part of the wl_init compilation unit. This lets us do things like
transparently rename our copies of Wayland globals.
The OS version of wayland-client-protocol.h is no longer used by GLFW,
but it is presumably ABI compatible with the output of wayland-scanner.
Closes#1174.
Closes#1338.
Related to #1655.
Closes#1943.
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.
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.
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)
This changes the default value of the GLFW_BUILD_EXAMPLES and
GLFW_BUILD_TESTS CMake options to false when GLFW is being added as
a subdirectory by another CMake project.
If you want the previous behavior, force these options to true before
adding the GLFW subdirectory:
set(GLFW_BUILD_EXAMPLES ON CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/glfw)
Doing this is backward compatible with earlier versions of GLFW.
The GLFW_BUILD_DOCS option is left enabled as it also requires Doxygen
to have any effect, is quicker to build and is more likely to be useful
when GLFW is a subproject.
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.
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.
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
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.
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.
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.