meson.build: build introspection according to option only
authorAlexander Kanavin <alex@linutronix.de>
Mon, 2 Jan 2023 14:00:02 +0000 (15:00 +0100)
committerAlexander Kanavin <alex@linutronix.de>
Tue, 3 Jan 2023 07:26:07 +0000 (08:26 +0100)
The way the check is written, if the build is native, then the
introspection option has no effect.

Particularly yocto project does want to disable introspection in
native builds and enable it in cross builds (both via the option),
and without this patch the former is not possible.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
meson.build

index ab46c7dcdadd3997614ec6d7be07d51593245493..4282f2701c5e11c8b882d9a204d290d13d1d8beb 100644 (file)
@@ -730,7 +730,7 @@ 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())
+build_gir = gir.found() and get_option('introspection').enabled()
 
 
 project_build_root = meson.current_build_dir()