build script: handle universal binary build in pkg-config installation

This commit is contained in:
alexey.lysiuk 2021-01-06 11:35:05 +02:00
parent 2d534e7872
commit c8475d6dfe

View file

@ -1295,8 +1295,11 @@ class PkgConfigTarget(ConfigureMakeDependencyTarget):
return os.path.exists(builder.source_path + 'pkg-config.1')
def post_build(self, builder: 'Builder'):
bin_path = self.prefix + '/bin/'
os.makedirs(bin_path, exist_ok=True)
src_path = builder.build_path + 'pkg-config'
dst_path = builder.deps_path + self.name + os.sep + 'bin' + os.sep + 'pkg-config.exe'
dst_path = bin_path + 'pkg-config.exe'
shutil.copy(src_path, dst_path)