Don't depend on gtk+-3.0 if xmllint is found
When validating the .ui files, we need to determine the path to GTK 4's relaxng schema. Previously this was erroneously looked up in the prefix of GTK 3, which malcontent otherwise doesn't depend on. Define the GTK dependency once, and use that variable everywhere.
This commit is contained in:
parent
2da5d5597e
commit
1c7fe694fa
|
@ -28,7 +28,7 @@ libmalcontent_ui_public_deps = [
|
||||||
dependency('gio-2.0', version: '>= 2.44'),
|
dependency('gio-2.0', version: '>= 2.44'),
|
||||||
dependency('glib-2.0', version: '>= 2.54.2'),
|
dependency('glib-2.0', version: '>= 2.54.2'),
|
||||||
dependency('gobject-2.0', version: '>= 2.54'),
|
dependency('gobject-2.0', version: '>= 2.54'),
|
||||||
dependency('gtk4', version: '>= 4.6'),
|
gtk_dep,
|
||||||
libadwaita_dep,
|
libadwaita_dep,
|
||||||
libmalcontent_dep,
|
libmalcontent_dep,
|
||||||
]
|
]
|
||||||
|
@ -82,7 +82,7 @@ libmalcontent_ui_gir = gnome.generate_gir(libmalcontent_ui,
|
||||||
|
|
||||||
xmllint = find_program('xmllint', required: false)
|
xmllint = find_program('xmllint', required: false)
|
||||||
if xmllint.found()
|
if xmllint.found()
|
||||||
gtk_prefix = dependency('gtk+-3.0').get_variable(pkgconfig: 'prefix')
|
gtk_prefix = gtk_dep.get_variable(pkgconfig: 'prefix')
|
||||||
test(
|
test(
|
||||||
'validate-ui', xmllint,
|
'validate-ui', xmllint,
|
||||||
args: [
|
args: [
|
||||||
|
|
|
@ -27,7 +27,7 @@ malcontent_control = executable('malcontent-control',
|
||||||
dependency('gio-2.0', version: '>= 2.44'),
|
dependency('gio-2.0', version: '>= 2.44'),
|
||||||
dependency('glib-2.0', version: '>= 2.54.2'),
|
dependency('glib-2.0', version: '>= 2.54.2'),
|
||||||
dependency('gobject-2.0', version: '>= 2.54'),
|
dependency('gobject-2.0', version: '>= 2.54'),
|
||||||
dependency('gtk4', version: '>= 4.6'),
|
gtk_dep,
|
||||||
dependency('polkit-gobject-1'),
|
dependency('polkit-gobject-1'),
|
||||||
libadwaita_dep,
|
libadwaita_dep,
|
||||||
libmalcontent_dep,
|
libmalcontent_dep,
|
||||||
|
@ -79,7 +79,7 @@ endif
|
||||||
|
|
||||||
xmllint = find_program('xmllint', required: false)
|
xmllint = find_program('xmllint', required: false)
|
||||||
if xmllint.found()
|
if xmllint.found()
|
||||||
gtk_prefix = dependency('gtk+-3.0').get_variable(pkgconfig: 'prefix')
|
gtk_prefix = gtk_dep.get_variable(pkgconfig: 'prefix')
|
||||||
test(
|
test(
|
||||||
'validate-ui', xmllint,
|
'validate-ui', xmllint,
|
||||||
args: [
|
args: [
|
||||||
|
|
|
@ -134,6 +134,7 @@ else
|
||||||
'Malcontent-' + libmalcontent_api_version + '.typelib']
|
'Malcontent-' + libmalcontent_api_version + '.typelib']
|
||||||
endif
|
endif
|
||||||
if get_option('ui').enabled()
|
if get_option('ui').enabled()
|
||||||
|
gtk_dep = dependency('gtk4', version: '>= 4.6')
|
||||||
libadwaita_dep = dependency(
|
libadwaita_dep = dependency(
|
||||||
'libadwaita-1',
|
'libadwaita-1',
|
||||||
version: '>= 1.1',
|
version: '>= 1.1',
|
||||||
|
|
Loading…
Reference in New Issue