mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-11 13:29:45 -05:00
Use #if instead of #ifdef for wlroots config data
This prevents some annoying issues when e.g. not including wlr/config.h or making a typo in the guard name.
This commit is contained in:
parent
3181c4bec0
commit
51bfdd620e
25 changed files with 69 additions and 61 deletions
|
|
@ -9,7 +9,7 @@ install_headers(
|
|||
subdir: 'wlr/backend',
|
||||
)
|
||||
|
||||
if conf_data.get('WLR_HAS_X11_BACKEND', false)
|
||||
if conf_data.get('WLR_HAS_X11_BACKEND', 0) == 1
|
||||
install_headers('x11.h', subdir: 'wlr/backend')
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ install_headers(
|
|||
'xcursor.h',
|
||||
subdir: 'wlr'
|
||||
)
|
||||
if conf_data.get('WLR_HAS_XWAYLAND', false)
|
||||
if conf_data.get('WLR_HAS_XWAYLAND', 0) == 1
|
||||
install_headers('xwayland.h', subdir: 'wlr')
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <wlr/config.h>
|
||||
|
||||
#if !(defined(WLR_HAS_X11_BACKEND) || defined(WLR_HAS_WAYLAND))
|
||||
#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
|
||||
#define MESA_EGL_NO_X11_HEADERS
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <wlr/config.h>
|
||||
|
||||
#if !(defined(WLR_HAS_X11_BACKEND) || defined(WLR_HAS_WAYLAND))
|
||||
#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
|
||||
#define MESA_EGL_NO_X11_HEADERS
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue