Skip to content

Commit e910a6f

Browse files
committed
meson.build: improve handling of vulkan and gles2 dependencies
1 parent 16b29be commit e910a6f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pangocairo = dependency('pangocairo')
3636
drm = dependency('libdrm')
3737
egl = dependency('egl')
3838
glesv2 = dependency('glesv2')
39+
vulkan = dependency('vulkan', required: false)
3940
glm = dependency('glm', required: false)
4041
libinput = dependency('libinput', version: '>=1.7.0')
4142
pixman = dependency('pixman-1')

src/api/wayfire/nonstd/wlroots-full.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ extern "C"
3232
#include <wlr/render/allocator.h>
3333
#include <wlr/render/color.h>
3434

35-
#if __has_include(<wlr/render/gles2.h>)
35+
#if WLR_HAS_GLES2_RENDERER
3636
#include <wlr/render/gles2.h>
3737
#endif
3838

39-
#if __has_include(<wlr/render/vulkan.h>)
39+
#if WLR_HAS_VULKAN_RENDERER
4040
#include <wlr/render/vulkan.h>
4141
#endif
4242

src/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ public_api_requirements = [
153153
'wf-config',
154154
]
155155

156+
if wlroots_features['gles2_renderer']
157+
public_api_requirements += glesv2
158+
endif
159+
160+
if wlroots_features['vulkan_renderer']
161+
public_api_requirements += vulkan
162+
endif
163+
156164
pkgconfig = import('pkgconfig')
157165
pkgconfig.generate(
158166
version: meson.project_version(),

0 commit comments

Comments
 (0)