Skip to content

Commit

Permalink
Only look for wlroots subproject if dep isn't found
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed May 7, 2024
1 parent 1403bb8 commit 2c67262
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 11 additions & 7 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,22 @@ wayland_server = dependency('wayland-server',
default_options: wayland_project_options,
)

wlroots_options = [ 'examples=false', 'default_library=static' ]
wlroots_options = [ 'examples=false' ]
wlroots_version = ['>=0.17.0', '<0.18.0']
wlroots_is_sub = subproject(
'wlroots',
default_options: wlroots_options,
required: false,
version: wlroots_version,
).found()
wlroots = dependency('wlroots',
version: wlroots_version,
default_options: wlroots_options,
required: false,
)
if not wlroots.found()
wlroots_proj = subproject(
'wlroots',
default_options: wlroots_options,
version: wlroots_version,
)
wlroots = wlroots_proj.get_variable('wlroots')
endif


drm = dependency('libdrm',
version: '>=2.4.114',
Expand Down
8 changes: 3 additions & 5 deletions render/fx_renderer/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ wlr_files += files(
'fx_renderer.c',
)

if not wlroots_is_sub
wlr_files += files([
'matrix.c',
])
endif
wlr_files += files([
'matrix.c',
])

if 'gles2' in renderers or 'auto' in renderers
egl = dependency('egl', required: 'gles2' in renderers)
Expand Down
10 changes: 4 additions & 6 deletions types/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ wlr_files += files(
'scene/wlr_scene.c',
)

if not wlroots_is_sub
wlr_files += files([
'output/wlr_output.c',
'buffer/buffer.c',
])
endif
wlr_files += files([
'output/wlr_output.c',
'buffer/buffer.c',
])

subdir('fx')

0 comments on commit 2c67262

Please sign in to comment.