diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-06-01 11:55:18 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-08-01 14:25:59 +0100 |
commit | 01118ce2a45ec3111b29f2de70bc127b3400ebb2 (patch) | |
tree | d7fe56b12c7fad4f8434be064125fa3d0fa4512c /mesonbuild/dependencies/ui.py | |
parent | 82bdf07a9d1ca6c62d4645a8c996975a5cef2989 (diff) | |
download | meson-01118ce2a45ec3111b29f2de70bc127b3400ebb2.zip meson-01118ce2a45ec3111b29f2de70bc127b3400ebb2.tar.gz meson-01118ce2a45ec3111b29f2de70bc127b3400ebb2.tar.bz2 |
Add a finish_init callback to ConfigToolDependency()
Give ConfigToolDependency() a finish_init callback, so that tool-specific
initialization can be called from the constructor, rather than after
construction in the factory class.
v2:
finalize -> finish_init for clarity
Diffstat (limited to 'mesonbuild/dependencies/ui.py')
-rw-r--r-- | mesonbuild/dependencies/ui.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index e25d135..ca7db3f 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -464,10 +464,7 @@ class SDL2Dependency(ExternalDependency): candidates.append(functools.partial(ConfigToolDependency.factory, 'sdl2', environment, None, kwargs, ['sdl2-config'], - 'sdl2-config')) -# if ctdep.found(): -# ctdep.compile_args = ctdep.get_config_value(['--cflags'], 'compile_args') -# ctdep.link_args = ctdep.get_config_value(['--libs'], 'link_args') + 'sdl2-config', SDL2Dependency.tool_finish_init)) if DependencyMethods.EXTRAFRAMEWORK in methods: if mesonlib.is_osx(): @@ -478,6 +475,11 @@ class SDL2Dependency(ExternalDependency): return candidates @staticmethod + def tool_finish_init(ctdep): + ctdep.compile_args = ctdep.get_config_value(['--cflags'], 'compile_args') + ctdep.link_args = ctdep.get_config_value(['--libs'], 'link_args') + + @staticmethod def get_methods(): if mesonlib.is_osx(): return [DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL, DependencyMethods.EXTRAFRAMEWORK] |