[meson] Don't allow introspection on static library

This commit is contained in:
Ebrahim Byagowi 2020-07-14 17:47:10 +04:30
parent 9566904cb3
commit 5c8e1bd237
1 changed files with 11 additions and 1 deletions

View File

@ -617,7 +617,17 @@ if have_gobject
)
gir = find_program('g-ir-scanner', required: get_option('introspection'))
build_gir = gir.found() and not meson.is_cross_build()
build_gir = gir.found()
build_gir = build_gir and not meson.is_cross_build()
if not build_gir and get_option('introspection').enabled()
error('Introspection support is requested but it isn\'t available in cross builds')
endif
build_gir = build_gir and get_option('default_library') != 'static'
if not build_gir and get_option('introspection').enabled()
error('Introspection support is requested but the default library option should be shared or both')
endif
if build_gir
conf.set('HAVE_INTROSPECTION', 1)