mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-11 13:29:49 -05:00
Make it possible to enable/disable the various compositors from configure
This commit is contained in:
parent
c5d6be9530
commit
a941022372
3 changed files with 59 additions and 9 deletions
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -1462,12 +1464,22 @@ int main(int argc, char *argv[])
|
|||
|
||||
display = wl_display_create();
|
||||
|
||||
ec = NULL;
|
||||
|
||||
#if BUILD_WAYLAND_COMPOSITOR
|
||||
if (getenv("WAYLAND_DISPLAY"))
|
||||
ec = wayland_compositor_create(display, width, height);
|
||||
else if (getenv("DISPLAY"))
|
||||
#endif
|
||||
|
||||
#if BUILD_X11_COMPOSITOR
|
||||
if (ec == NULL && getenv("DISPLAY"))
|
||||
ec = x11_compositor_create(display, width, height);
|
||||
else
|
||||
#endif
|
||||
|
||||
#if BUILD_DRM_COMPOSITOR
|
||||
if (ec == NULL)
|
||||
ec = drm_compositor_create(display, option_connector);
|
||||
#endif
|
||||
|
||||
if (ec == NULL) {
|
||||
fprintf(stderr, "failed to create compositor\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue