pkgconfig generator: Fix crash when passing a SharedModule
This commit is contained in:
parent
aef1a81b35
commit
142f51a7b5
|
@ -87,6 +87,7 @@ class DependenciesHelper:
|
||||||
processed_reqs = []
|
processed_reqs = []
|
||||||
processed_cflags = []
|
processed_cflags = []
|
||||||
for obj in libs:
|
for obj in libs:
|
||||||
|
shared_library_only = getattr(obj, 'shared_library_only', False)
|
||||||
if hasattr(obj, 'pcdep'):
|
if hasattr(obj, 'pcdep'):
|
||||||
pcdeps = mesonlib.listify(obj.pcdep)
|
pcdeps = mesonlib.listify(obj.pcdep)
|
||||||
for d in pcdeps:
|
for d in pcdeps:
|
||||||
|
@ -105,7 +106,7 @@ class DependenciesHelper:
|
||||||
if obj.found():
|
if obj.found():
|
||||||
processed_libs += obj.get_link_args()
|
processed_libs += obj.get_link_args()
|
||||||
processed_cflags += obj.get_compile_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
|
# Do not pull dependencies for shared libraries because they are
|
||||||
# only required for static linking. Adding private requires has
|
# only required for static linking. Adding private requires has
|
||||||
# the side effect of exposing their cflags, which is the
|
# the side effect of exposing their cflags, which is the
|
||||||
|
|
Loading…
Reference in New Issue