Skip to content

Commit fa0485f

Browse files
meson: Ensure GTK/Qt support is enabled for gtk2/qt5 build option
This avoids misconfiguration as reported in #1815.
1 parent d9d14f2 commit fa0485f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ if get_option('qt')
3535
qt_req = '>= 6.0'
3636
qt_dep = dependency('qt6', version: qt_req, required: true, modules: ['Core', 'Widgets', 'Gui', 'Svg'])
3737
endif
38+
else
39+
if get_option('qt5')
40+
error('Qt 5 support cannot be enabled when Qt support was explicitly disabled.')
41+
endif
3842
endif
3943

4044

@@ -46,6 +50,10 @@ if get_option('gtk')
4650
gtk_req = '>= 3.24'
4751
gtk_dep = dependency('gtk+-3.0', version: gtk_req, required: true)
4852
endif
53+
else
54+
if get_option('gtk2')
55+
error('GTK 2 support cannot be enabled when GTK support was explicitly disabled.')
56+
endif
4957
endif
5058

5159

0 commit comments

Comments
 (0)