pkgconfig generator: Fix crash when passing a SharedModule

This commit is contained in:
Xavier Claessens 2018-04-06 21:05:53 -04:00
parent aef1a81b35
commit 142f51a7b5
1 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ class DependenciesHelper:
processed_reqs = []
processed_cflags = []
for obj in libs:
shared_library_only = getattr(obj, 'shared_library_only', False)
if hasattr(obj, 'pcdep'):
pcdeps = mesonlib.listify(obj.pcdep)
for d in pcdeps:
@ -105,7 +106,7 @@ class DependenciesHelper:
if obj.found():
processed_libs += obj.get_link_args()
processed_cflags += obj.get_compile_args()
elif isinstance(obj, build.SharedLibrary) and obj.shared_library_only:
elif isinstance(obj, build.SharedLibrary) and shared_library_only:
# Do not pull dependencies for shared libraries because they are
# only required for static linking. Adding private requires has
# the side effect of exposing their cflags, which is the