aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/ui.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-06-08 14:01:54 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2020-06-10 01:06:25 +0300
commit5663b4a3e8507199318965132cdc9cc53a59da80 (patch)
treecda0570426cd64a2ac12355fa1c1777a6f51ea08 /mesonbuild/dependencies/ui.py
parent58e1534773b4c402656abd0f1c760682b8af5860 (diff)
downloadmeson-5663b4a3e8507199318965132cdc9cc53a59da80.zip
meson-5663b4a3e8507199318965132cdc9cc53a59da80.tar.gz
meson-5663b4a3e8507199318965132cdc9cc53a59da80.tar.bz2
dependencies: Remove finish_init method
This is a holdover from before we had the DependencyFactory. It should have already been refactored into the initializer, but wasn't for some reason.
Diffstat (limited to 'mesonbuild/dependencies/ui.py')
-rw-r--r--mesonbuild/dependencies/ui.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index 741f0b8..4b3d634 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -545,10 +545,12 @@ class SDL2DependencyConfigTool(ConfigToolDependency):
tools = ['sdl2-config']
tool_name = 'sdl2-config'
- @staticmethod
- def finish_init(ctdep):
- ctdep.compile_args = ctdep.get_config_value(['--cflags'], 'compile_args')
- ctdep.link_args = ctdep.get_config_value(['--libs'], 'link_args')
+ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.Any]):
+ super().__init__(name, environment, kwargs)
+ if not self.is_found:
+ return
+ self.compile_args = self.get_config_value(['--cflags'], 'compile_args')
+ self.link_args = self.get_config_value(['--libs'], 'link_args')
@staticmethod
def get_methods():