Shaderc pkg config
This commit is contained in:
parent
3814d698b1
commit
b510bc12ac
|
@ -735,12 +735,25 @@ class ShadercDependency(ExternalDependency):
|
||||||
methods = cls._process_method_kw(kwargs)
|
methods = cls._process_method_kw(kwargs)
|
||||||
candidates = []
|
candidates = []
|
||||||
|
|
||||||
|
if DependencyMethods.PKGCONFIG in methods:
|
||||||
|
# ShaderC packages their shared and static libs together
|
||||||
|
# and provides different pkg-config files for each one. We
|
||||||
|
# smooth over this difference by handling the static
|
||||||
|
# keyword before handing off to the pkg-config handler.
|
||||||
|
shared_libs = ['shaderc']
|
||||||
|
static_libs = ['shaderc_combined', 'shaderc_static']
|
||||||
|
|
||||||
|
if kwargs.get('static', False):
|
||||||
|
c = [functools.partial(PkgConfigDependency, name, environment, kwargs)
|
||||||
|
for name in static_libs + shared_libs]
|
||||||
|
else:
|
||||||
|
c = [functools.partial(PkgConfigDependency, name, environment, kwargs)
|
||||||
|
for name in shared_libs + static_libs]
|
||||||
|
candidates.exend(c)
|
||||||
|
|
||||||
if DependencyMethods.SYSTEM in methods:
|
if DependencyMethods.SYSTEM in methods:
|
||||||
candidates.append(functools.partial(ShadercDependency, environment, kwargs))
|
candidates.append(functools.partial(ShadercDependency, environment, kwargs))
|
||||||
|
|
||||||
if DependencyMethods.PKGCONFIG in methods:
|
|
||||||
candidates.append(functools.partial(PkgConfigDependency, 'shaderc', environment, kwargs))
|
|
||||||
|
|
||||||
return candidates
|
return candidates
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue