Commit Graph

255 Commits

Author SHA1 Message Date
Camilla Löwy
135d87aa3c Remove inclusion of X11 extension header paths
They should be found in X11/extensions on every platform.
2019-12-09 23:35:50 +01:00
Camilla Löwy
dff6253ca7 Add installation of HTML documentation 2019-12-09 23:35:50 +01:00
Camilla Löwy
b5d4f24f74 Move CMake uninstall template file to CMake subdir 2019-11-14 21:49:14 +01:00
Camilla Löwy
71e6ff386d 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)
2019-05-24 14:58:54 +02:00
Camilla Löwy
98dde03ce1 Fix variable dereferencing 2019-05-24 14:58:54 +02:00
Camilla Löwy
ceb16cb5f1 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.
2019-05-17 17:26:46 +02:00
Camilla Löwy
8ee589e43b Disable examples and tests when a subproject
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.
2019-05-17 16:12:52 +02:00
Camilla Löwy
cd290f767f Use CMakeDependentOption for dependent options
This replaces the earlier manual logic for dependent CMake options with
the cmake_dependent_option function from CMakeDependentOption.
2019-05-17 16:12:52 +02:00
Camilla Löwy
a255e7ace6 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).
2019-05-17 16:12:52 +02:00
Camilla Löwy
5c5963f1c0 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.
2019-05-17 16:12:52 +02:00
Camilla Löwy
090b16bfae X11: Fix CMake not checking for XInput2 headers
Fixes #1480.
2019-05-17 16:12:52 +02:00
Camilla Löwy
a337c56848 Start 3.4 2019-04-16 23:08:39 +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
Camilla Löwy
67a55efa27 Add null joystick backend
This prepares the X11 backend to support other joystick APIs, for
example the FreeBSD libusb one.
2017-02-01 03:07:25 +01:00
Camilla Löwy
6eae8f22dc X11: Load Xxf86vm at run-time 2016-12-11 00:05:15 +01:00
Camilla Löwy
58ceab5f1e Add GLFW_COCOA_RETINA_FRAMEBUFFER
Look, a can of worms!  I wonder what's inside.

This adds the first platform specific window hint, transforming
a compile-time option to a run-time per-window one.
2016-12-08 16:56:05 +01:00
Camilla Löwy
cc9168bda1 Win32: Fix build on VC++ 2008
This is not official support for VC++ 2008.

Fixes #821.
2016-12-03 20:06:23 +01:00
Camilla Berglund
fef21361c5 OSMesa: Cleanup
Fixes formatting, semantics and documentation.  Adds
glfwGetOSMesaContext.  Adds support for OSMesa context attributes.
Updates changelog and credits.  Adds license and copyright headers.
Removes superfluous code (the shared code provides many conveniences).
Removes loading of unused OSMesa functions.  Removes empty platform
structs.  Fixes version string format.  Removes build dependency on
the OSMesa header and library (only the library is needed and only at
runtime).

Closes #850.
2016-11-09 01:36:21 +01:00
Jason Daly
368fa9475d Add headless OSMesa backend
Allows creation and drawing to in-memory OpenGL contexts.

This backend does not provide input.

Related to #850.
2016-11-09 01:23:43 +01:00
Camilla Berglund
e94d16667b Cocoa: Add basic support for Vulkan via MoltenVK
This adds basic support for MoltenVK, a Vulkan implementation on top of
Metal, on macOS 10.11 and later.  It looks for MoltenVK in the process
via RTLD_DEFAULT symbol lookup if _GLFW_VULKAN_STATIC is disabled.

glfwCreateWindowSurface now creates and sets a CAMetalLayer for the
window content view, which is required for MoltenVK to function.

You must help CMake find MoltenVK for the Vulkan test to be built.

Fixes #870.
2016-11-01 21:39:54 +01:00
Camilla Berglund
017162e3fd Cocoa: Stop searching for system frameworks 2016-11-01 21:34:26 +01:00
Camilla Berglund
53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
Camilla Berglund
7c3706763a Cleanup
Cleanup of 8bdb105897.

Add build macro to configuration header and documentation.  Add
corresponding CMake option.  Add change log entry and credit.  Add
loader static library to link dependencies and add detection to
FindVulkan.cmake.
2016-08-05 01:00:08 +02:00
Alexandre Pretyman
d3775b973e Fix clobbering of CMAKE_MODULE_PATH
Closes #822.
2016-08-04 18:14:44 +02:00
Camilla Berglund
4bccb3dc9f Start 3.2.1 2016-06-15 01:35:05 +02:00
Camilla Berglund
d203ccbf5e Add workaround for missing headers in legacy MinGW 2016-06-02 14:21:56 +02:00