Set the pkg-config for cross-compiling.

This is needed for win32 on fedora.
It is better to use a specific pkg-config than setting a PKG_CONFIG_LIBDIR.
This avoid other CI (libzim/...) to set a env var specific to win32 build.
This commit is contained in:
Matthieu Gautier 2020-01-20 21:28:39 +01:00
parent 82617f6b94
commit 2774967e6d
6 changed files with 14 additions and 7 deletions

View File

@ -26,8 +26,10 @@ class AndroidPlatformInfo(PlatformInfo):
def binaries(self):
install_path = self.install_path
return {k:pj(install_path, 'bin', v)
for k,v in self.binaries_name.items()}
binaries = {k:pj(install_path, 'bin', v)
for k,v in self.binaries_name.items()}
binaries['PKGCONFIG'] = 'pkg-config'
return binaries
@property
def ndk_builder(self):

View File

@ -49,8 +49,10 @@ class ArmhfPlatformInfo(PlatformInfo):
('RANLIB', 'ranlib'),
('LD', 'ld'))
)
return {k:pj(self.root_path, 'bin', v)
for k,v in binaries}
binaries = {k:pj(self.root_path, 'bin', v)
for k,v in binaries}
binaries['PKGCONFIG'] = 'pkg-config'
return binaries
@property
def exe_wrapper_def(self):

View File

@ -37,7 +37,8 @@ class I586PlatformInfo(PlatformInfo):
('AR', 'ar'),
('STRIP', 'strip'),
('RANLIB', 'ranlib'),
('LD', 'ld'))
('LD', 'ld'),
('PKGCONFIG', 'pkg-config'))
}
def set_env(self, env):

View File

@ -64,6 +64,7 @@ class iOSPlatformInfo(PlatformInfo):
'STRIP': '/usr/bin/strip',
'RANLIB': '/usr/bin/ranlib',
'LD': '/usr/bin/ld',
'PKGCONFIG': 'pkg-config',
}
@property

View File

@ -49,7 +49,8 @@ class Win32PlatformInfo(PlatformInfo):
('AR', 'ar'),
('STRIP', 'strip'),
('WINDRES', 'windres'),
('RANLIB', 'ranlib'))
('RANLIB', 'ranlib'),
('PKGCONFIG', 'pkg-config'))
}
@property

View File

@ -1,5 +1,5 @@
[binaries]
pkgconfig = 'pkg-config'
pkgconfig = '{binaries[PKGCONFIG]}'
c = '{binaries[CC]}'
ar = '{binaries[AR]}'
cpp = '{binaries[CXX]}'