dependencies/pkg-config: Add support for different cross_flags
This commit is contained in:
parent
377b652b93
commit
91b2475e30
|
@ -616,7 +616,10 @@ class PkgConfigDependency(ExternalDependency):
|
||||||
else:
|
else:
|
||||||
env = env.copy()
|
env = env.copy()
|
||||||
|
|
||||||
extra_paths = self.env.coredata.get_builtin_option('pkg_config_path')
|
if self.want_cross:
|
||||||
|
extra_paths = self.env.coredata.get_builtin_option('cross_pkg_config_path')
|
||||||
|
else:
|
||||||
|
extra_paths = self.env.coredata.get_builtin_option('pkg_config_path')
|
||||||
env['PKG_CONFIG_PATH'] = ':'.join([p for p in extra_paths])
|
env['PKG_CONFIG_PATH'] = ':'.join([p for p in extra_paths])
|
||||||
fenv = frozenset(env.items())
|
fenv = frozenset(env.items())
|
||||||
targs = tuple(args)
|
targs = tuple(args)
|
||||||
|
|
|
@ -5169,6 +5169,11 @@ class LinuxCrossMingwTests(BasePlatformTests):
|
||||||
# Must run in-process or we'll get a generic CalledProcessError
|
# Must run in-process or we'll get a generic CalledProcessError
|
||||||
self.run_tests(inprocess=True)
|
self.run_tests(inprocess=True)
|
||||||
|
|
||||||
|
@skipIfNoPkgconfig
|
||||||
|
def test_cross_pkg_config_option(self):
|
||||||
|
testdir = os.path.join(self.unit_test_dir, '55 pkg_config_path option')
|
||||||
|
self.init(testdir, extra_args=['-Dcross_pkg_config_path=' + os.path.join(testdir, 'extra_path')])
|
||||||
|
|
||||||
|
|
||||||
class PythonTests(BasePlatformTests):
|
class PythonTests(BasePlatformTests):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue