diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-02 20:39:28 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-12 17:00:55 +0200 |
commit | 6b548a1c7587238415e32cde6121b071ebee490c (patch) | |
tree | 70a1268cfcab89aac3fb27ea9160d1caac8d7c69 /mesonbuild/dependencies.py | |
parent | 0d5eaa27218573f887013fb5bb40f435d34f745e (diff) | |
download | meson-6b548a1c7587238415e32cde6121b071ebee490c.zip meson-6b548a1c7587238415e32cde6121b071ebee490c.tar.gz meson-6b548a1c7587238415e32cde6121b071ebee490c.tar.bz2 |
Added find_library method and deprecated the standalone version. Closes #396.
Diffstat (limited to 'mesonbuild/dependencies.py')
-rw-r--r-- | mesonbuild/dependencies.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index 70486dc..ee2dd62 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -388,7 +388,14 @@ class ExternalLibrary(Dependency): def __init__(self, name, fullpath=None, silent=False): super().__init__() self.name = name - self.fullpath = fullpath + # Rename fullpath to link_args once standalone find_library() gets removed. + if fullpath is not None: + if isinstance(fullpath, list): + self.fullpath = fullpath + else: + self.fullpath = [fullpath] + else: + self.fullpath = fullpath if not silent: if self.found(): mlog.log('Library', mlog.bold(name), 'found:', mlog.green('YES'), @@ -401,7 +408,7 @@ class ExternalLibrary(Dependency): def get_link_args(self): if self.found(): - return [self.fullpath] + return self.fullpath return [] class BoostDependency(Dependency): |