Skip to content

Commit

Permalink
meson.build: try to bail out early if forcing system wlroots but it c…
Browse files Browse the repository at this point in the history
…an't be used

Fixes #1175
  • Loading branch information
ammen99 committed Sep 4, 2023
1 parent efc9931 commit ea07520
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,16 @@ pixman = dependency('pixman-1')
threads = dependency('threads')
xkbcommon = dependency('xkbcommon')
libdl = meson.get_compiler('cpp').find_library('dl')
wlroots = dependency('wlroots', version: ['>=0.16.0', '<0.17.0'], required: get_option('use_system_wlroots'))
wfconfig = dependency('wf-config', version: ['>=0.8.0', '<0.9.0'], required: get_option('use_system_wfconfig'))
wlroots = dependency('wlroots', version: ['>=0.16.0', '<0.17.0'], required: false)
wfconfig = dependency('wf-config', version: ['>=0.8.0', '<0.9.0'], required: false)

if get_option('use_system_wlroots').enabled() and not wlroots.found()
error('User specified use_system_wlroots=true, but system wlroots not found!')
endif

if get_option('use_system_wfconfig').enabled() and not wfconfig.found()
error('User specified use_system_wfconfig=true, but system wfconfig not found!')
endif

use_system_wlroots = not get_option('use_system_wlroots').disabled() and wlroots.found()
if not use_system_wlroots
Expand Down

0 comments on commit ea07520

Please sign in to comment.