pkgconfig generator: Fix crash when passing a SharedModule
@@ -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
