gplugin/gplugin

Parents 324c493cf9cf
Children 072159807045
Change the GTK4 option from a boolean to a feature until it's ready

Testing Done:
Ran with `-Dgtk4=disabled` as well as `-Dgtk4=auto`.

Reviewed at https://reviews.imfreedom.org/r/1049/
--- a/gplugin-gtk4-viewer/meson.build Thu Oct 14 20:29:14 2021 -0500
+++ b/gplugin-gtk4-viewer/meson.build Thu Oct 14 22:56:21 2021 -0500
@@ -1,4 +1,4 @@
-if get_option('gtk4')
+if GTK4.found()
if not get_option('install-gplugin-gtk4-viewer')
summary('gplugin-gtk4-viewer',
--- a/gplugin-gtk4/meson.build Thu Oct 14 20:29:14 2021 -0500
+++ b/gplugin-gtk4/meson.build Thu Oct 14 22:56:21 2021 -0500
@@ -1,9 +1,10 @@
-if get_option('gtk4')
+GTK4 = dependency('gtk4', version : '>=4.0.0', required : get_option('gtk4'))
+
+if GTK4.found()
###############################################################################
# Build Info
###############################################################################
-GTK4 = dependency('gtk4', version : '>=4.0.0')
GPLUGIN_GTK4_LIBRARY_VERSION = '0.1.0'
--- a/meson.build Thu Oct 14 20:29:14 2021 -0500
+++ b/meson.build Thu Oct 14 22:56:21 2021 -0500
@@ -141,7 +141,7 @@
if get_option('gtk3')
doc_targets += gplugin_gtk3_doc
endif
- if get_option('gtk4')
+ if GTK4.found()
doc_targets += gplugin_gtk4_doc
endif
@@ -158,7 +158,7 @@
summary({
'api reference' : get_option('doc'),
'GTK3 widgets' : get_option('gtk3'),
- 'GTK4 widgets' : get_option('gtk4'),
+ 'GTK4 widgets' : GTK4.found(),
'man pages' : get_option('help2man'),
}, bool_yn : true, section : 'Miscellaneous')
--- a/meson_options.txt Thu Oct 14 20:29:14 2021 -0500
+++ b/meson_options.txt Thu Oct 14 22:56:21 2021 -0500
@@ -24,7 +24,7 @@
option(
'gtk4',
- type : 'boolean', value : true,
+ type : 'feature',
description : 'Whether or not to build the GTK4 library'
)