aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-04-06 21:05:53 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2018-04-06 21:05:53 -0400
commit142f51a7b5c2defc760a57918fb0357477538356 (patch)
tree9fd0b11ea8c904d89b97d3db99ebb312ef6a60fa
parentaef1a81b3586aeb48988b60fbeaef5c19e112c45 (diff)
downloadmeson-142f51a7b5c2defc760a57918fb0357477538356.zip
meson-142f51a7b5c2defc760a57918fb0357477538356.tar.gz
meson-142f51a7b5c2defc760a57918fb0357477538356.tar.bz2
pkgconfig generator: Fix crash when passing a SharedModule
-rw-r--r--mesonbuild/modules/pkgconfig.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index c587f84..6e4f3df 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -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