aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-03-17 20:55:19 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-03-17 20:55:19 +0200
commit8b6848ebc3e146427bdf501208bd5ecb57316dc4 (patch)
treec604d340ae96c8d48d66204f38d4bc4836a4ccd2 /mesonbuild/dependencies.py
parenta3004652eaa8eef877ccf009e7a6ec8e32ad3475 (diff)
downloadmeson-8b6848ebc3e146427bdf501208bd5ecb57316dc4.zip
meson-8b6848ebc3e146427bdf501208bd5ecb57316dc4.tar.gz
meson-8b6848ebc3e146427bdf501208bd5ecb57316dc4.tar.bz2
Add dir support for find_library and remove deprecated standalone version. Closes #450.
Diffstat (limited to 'mesonbuild/dependencies.py')
-rw-r--r--mesonbuild/dependencies.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
index ee2dd62..b9f5c89 100644
--- a/mesonbuild/dependencies.py
+++ b/mesonbuild/dependencies.py
@@ -385,30 +385,29 @@ class ExternalProgram():
return self.name
class ExternalLibrary(Dependency):
- def __init__(self, name, fullpath=None, silent=False):
+ def __init__(self, name, link_args=None, silent=False):
super().__init__()
self.name = name
# Rename fullpath to link_args once standalone find_library() gets removed.
- if fullpath is not None:
- if isinstance(fullpath, list):
- self.fullpath = fullpath
+ if link_args is not None:
+ if isinstance(link_args, list):
+ self.link_args = link_args
else:
- self.fullpath = [fullpath]
+ self.link_args = [link_args]
else:
- self.fullpath = fullpath
+ self.link_args = link_args
if not silent:
if self.found():
- mlog.log('Library', mlog.bold(name), 'found:', mlog.green('YES'),
- '(%s)' % self.fullpath)
+ mlog.log('Library', mlog.bold(name), 'found:', mlog.green('YES'))
else:
mlog.log('Library', mlog.bold(name), 'found:', mlog.red('NO'))
def found(self):
- return self.fullpath is not None
+ return self.link_args is not None
def get_link_args(self):
if self.found():
- return self.fullpath
+ return self.link_args
return []
class BoostDependency(Dependency):