build: Lift gir and build_gir to toplevel

build_gir is used in multiple subdirectories,
so it is a bit nasty that it is defined in
one too.
This commit is contained in:
Matthias Clasen 2022-12-19 21:10:55 -05:00
parent e049b6992d
commit d758754f20
2 changed files with 5 additions and 3 deletions

View File

@ -1180,9 +1180,6 @@ libgtk = shared_library('gtk-4',
gtk_dep_sources = [gtkversion, gtktypebuiltins_h]
# Introspection
gir = find_program('g-ir-scanner', required : get_option('introspection'))
build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
if build_gir
gir_args = [
'-DGTK_COMPILATION',

View File

@ -728,6 +728,11 @@ int main () {
endif
endif
# Introspection
gir = find_program('g-ir-scanner', required : get_option('introspection'))
build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
project_build_root = meson.current_build_dir()
subdir('gtk/css')