aboutsummaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)Author
2024-02-15Define _POSIX_C_SOURCE globallySimon Ser
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead, require POSIX.1-2008 globally. A lot of core source files depend on that already. Some care must be taken on a few select files where we need a bit more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and some files need BSD extensions (_DEFAULT_SOURCE). In both cases, these feature test macros imply _POSIX_C_SOURCE. Make sure to not define both these macros and _POSIX_C_SOURCE explicitly to avoid POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001 but _XOPEN_SOURCE says POSIX.1-2008). Additionally, there is one special case in render/vulkan/vulkan.c. That file needs major()/minor(), and these are system-specific. On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need to make sure it's not defined for this file. On Linux, we can explicitly include <sys/sysmacros.h> and ensure that apart from symbols defined there the file only uses POSIX toys.
2024-01-27backend/drm: add support for atomic tearing page-flipsSimon Ser
The kernel patches [1] have been merged. [1]: https://patchwork.freedesktop.org/series/120103/
2023-12-08build: automatically compute soversionSimon Ser
Instead of requiring a manual soversion bump each time we do a release, automatically compute it from the version number. In the early days we used to not bump soversion, so there is an hardcoded offset. This will need to be updated once we ship 1.0, so assert that we're still on 0.x.
2023-11-28backend/drm: use DRM_IOCTL_MODE_CLOSEFB instead of RMFBSimon Ser
RMFB implicitly performs a modeset to turn off any CRTC which is using the FB. This prevents seamless transitions between two DRM masters from working. Use the new CLOSEFB IOCTL which doesn't turn off anything and leave it up to the compositor to turn off outputs on shutdown if it wants to.
2023-11-21build: bump version to 0.18.0-devSimon Ser
2023-11-21build: bump version to 0.17.0Simon Ser
2023-06-14build: drop proto_incSimon Ser
protocol/meson.build adds protocol header files to wlr_files. No need to add them via include dirs.
2023-04-14subcompositor: use bad_parent errorKirill Primak
2023-03-01util/log: prefix WLR_REL_SRC_DIR with underscoreSimon Ser
Just like _WLR_FILENAME and _WLR_ATTRIB_PRINTF, this makes it more obvious that this isn't part of our API.
2023-02-19build: enable subproject for libxkbcommonSimon Ser
References: https://github.com/xkbcommon/libxkbcommon/pull/315
2023-02-15build: set pkgconfig URLSimon Ser
For informational purposes.
2023-02-15build: remove unnecessary pkgconfig argumentsSimon Ser
If left unspecified, these defaults to the project name and version.
2022-12-06build: use a configuration file for internal featuresSimon Ser
This avoids re-building the whole project when switching one Meson option. This shrinks down the compiler invocation command line, making it more readable and making it easier to inspect which flags are passed in (the generated file can be opened). Additionally this is more consistent with our external feature handling, which uses <wlr/config.h> already.
2022-11-25backend/session: make optionalSimon Ser
Some compositors are not interested in wlr_session, for instance nested compositors. Disabling wlr_session removes the udev dependency.
2022-11-17allocator/drm_dumb: use libdrm dumb buffer helpersSimon Ser
References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/272
2022-11-11build: bump pixman versionSimon Ser
The new version offers const pixman_region32_t APIs, which we will make use of in the following commits.
2022-11-11build: add subproject fallback for PixmanSimon Ser
Allows users to use a Meson subproject for Pixman.
2022-11-11build: move udev dep to backend/Simon Ser
The DRM, libinput and session use udev. They are all hosted under backend/.
2022-11-11build: bump version to 0.17.0-devSimon Ser
2022-11-11build: bump to version 0.16.0Simon Ser
2022-10-28render/gles2: move shaders to individual filesSimon Ser
Instead of having a C file with strings for each shader, move each shader into its own file. Use a small POSIX shell script to convert the files into C strings (can't wait for C23 #embed...). The benefits from this are: - Improved readability and syntax highlighting. - Line numbers in shader compiler errors are easier to make sense of. - Consistency with the Vulkan renderer. - Shaders will become more complicated as we add color management features.
2022-09-25meson: update default options for libdrmRouven Czerwinski
Libdrm now uses enabled/disabled/auto for the drivers, migrate to these new defaults. Error message from meson: wlroots| subprojects/wlroots/subprojects/libdrm/meson.build:21:0: Exception: Value "false" (of type "string") for combo option "Enable support for Intel's KMS API." is not one of the choices. Possible choices are (as string): "enabled", "disabled", "auto".`
2022-09-14render/egl: improve DMA-BUF format/modifier loggingSimon Ser
For each format and modifier, log supported usage. Log a human-readable format/modifier string.
2022-08-18build: remove libkms option and disable tests for libdrm fallbackSimon Zeni
2022-07-25backend/drm: use drmModeGetConnectorTypeNameSimon Ser
No need to manually maintain this table now. The wlroots names and the libdrm (= kernel) names all match. References: https://gitlab.freedesktop.org/mesa/drm/-/commit/50f8d517733d24fce6693ffae552f9833e2e6aa9
2022-07-11build: bump Wayland to v1.21José Expósito
2022-06-24render: use internal_features to indicate EGL supportSimon Ser
Instead of checking whether the wlr_egl dependencies are available in the GLES2 code, introduce internal_features['egl'] and check that field. When updating the EGL dependency list, we no longer need to update the GLES2 logic.
2022-05-30build: make GBM optionalSimon Ser
Now that the DRM backend no longer depends on GBM, we can make it optional. The GLES2 renderer still depends on it because of our EGL device selection. This is useful for compositors with their own renderers, and for compositors using the Vulkan renderer.
2022-05-24build: bump version to 0.16.0-devSimon Ser
Same as [1]. [1]: https://github.com/swaywm/sway/pull/6730
2022-04-03meson: use target_machine instead of host_machineKirill Chibisov
2022-03-28meson: soversion arg should be stringKenny Levinsen
muon, a meson implementation in C, is more strict with its types and revealed this discrepancy between meson behavior and documentation.
2021-12-19build: simplify Meson subproject fallbacksSimon Ser
All of these projects use meson.override_dependency() so we can stop referencing their internal variable name to grab the depndencies we need.
2021-12-17build: bump soversionSimon Ser
According to [1] this should be done at each release with breaking ABI changes. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/wikis/Core-contributor-guide#releasing-a-new-version Fixes: 7360810f2e5c ("build: bump to version 0.16.0")
2021-12-17build: bump to version 0.16.0Simon Ser
2021-12-15backend/wayland: add basic linux-dmabuf feedback supportSimon Ser
This patch makes it so we bind to zwp_linux_dmabuf_v1 version 4 and we use it to grab the main device. v4 sends supported formats via a table so we need to handle this as well. v4 allows wlroots to remove the requirement for Mesa's internal wl_drm interface.
2021-12-14build: add subproject fallback for libdrmSimon Ser
2021-12-14backend/drm: use drmModeFormatModifierBlobIterNextSimon Ser
This avoids open-coding our own logic. The resulting code is more readable. References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
2021-12-13output: add support for protocol interface version 4Simon Ser
Two new events are added: name and description. The name is immutable. The description can be updated on-the-fly.
2021-12-07build: move wayland-client dep to backend/wayland/Simon Ser
wayland-client isn't really used by wlroots core, so let's move the dep to where it's needed in the Wayland backend.
2021-11-19tinywl: build with meson if examples option is enabledSimon Zeni
2021-10-18render/vulkan: add Vulkan renderernyorain
This new renderer is implemented with the existing wlr_renderer API (which is known to be sub-optimal for some operations). It's not used by default, but users can opt-in by setting WLR_RENDERER=vulkan. The renderer depends on VK_EXT_image_drm_format_modifier and VK_EXT_physical_device_drm. Co-authored-by: Simon Ser <contact@emersion.fr> Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
2021-09-01build: add subproject fallback for waylandSimon Ser
2021-08-06build: remove "." from include dirsSimon Ser
2021-07-22backend: make DRM and libinput backends optionalayaka
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-06-25build: use meson.global_build_root()Simon Ser
meson.build_root() is deprecated. References: https://github.com/mesonbuild/meson/pull/8629
2021-06-23build: bump version to 0.15.0Simon Ser
2021-06-20Revert "meson: Make private static library symbols local"Kenny Levinsen
This reverts commit 28d23ba6bda4f799b8d6689555cd33a40adda17e. The prelinking and symbol filtering pass breaks builds with link-time optimization enabled.
2021-06-17meson: Make private static library symbols localKenny Levinsen
Static libraries are not affected by our symbol file, so private symbols are globally visible by default. Use objcopy to make symbols that we do not want to expose local. Closes: https://github.com/swaywm/wlroots/issues/1892 Closes: https://github.com/swaywm/wlroots/issues/2952
2021-06-17backend/session: use drmIsKMSSimon Ser
This moves the magic incantation into libdrm and is clearer. See [1] for details. While at it, fixup the doc comment and improve logging. [1]: https://gitlab.freedesktop.org/mesa/drm/-/commit/523b3658aa8efa746417e916c987de23740ce313
2021-06-02xdg-activation-v1: new protocol implementationSimon Ser
This implements the new xdg-activation-v1 protocol [1]. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/50