修正lib导出方式

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
2021-09-06 20:08:35 +08:00
parent ea9ef7c75a
commit b259cb77f7
2 changed files with 3 additions and 14 deletions

View File

@@ -709,11 +709,12 @@ def GroupLibFullName(name, env):
return env['LIBPREFIX'] + name + env['LIBSUFFIX'] return env['LIBPREFIX'] + name + env['LIBSUFFIX']
def BuildLibInstallAction(target, source, env): def BuildLibInstallAction(target, source, env):
import rtconfig
lib_name = GetOption('buildlib') lib_name = GetOption('buildlib')
for Group in Projects: for Group in Projects:
if Group['name'] == lib_name: if Group['name'] == lib_name:
lib_name = GroupLibFullName(Group['name'], env) lib_name = GroupLibFullName(Group['name'], env)
dst_name = os.path.join(Group['path'], lib_name) dst_name = os.path.join(rtconfig.SHARE_LIB_PATH, Group['name'], lib_name)
print('Copy '+lib_name+' => ' + dst_name) print('Copy '+lib_name+' => ' + dst_name)
do_copy_file(lib_name, dst_name) do_copy_file(lib_name, dst_name)
break break

View File

@@ -48,19 +48,7 @@ class SharelibHandler:
def __export_lib(self, dist_path, path, libs): def __export_lib(self, dist_path, path, libs):
for lib in libs: for lib in libs:
libFile = path +'/lib' + lib + '.a' self._LIB_LIST.append(lib)
libExist = False
if os.path.isfile(libFile):
shutil.copy(libFile, dist_path)
libExist = True
libFile = path +'/lib' + lib + '.lib'
if os.path.isfile(libFile):
shutil.copy(libFile, dist_path)
libExist = True
if libExist:
self._LIB_LIST.append(lib)
def __export_headers(self, dist_path, group, path, headers, all, need_path = True): def __export_headers(self, dist_path, group, path, headers, all, need_path = True):
dst = os.path.join(dist_path, group) dst = os.path.join(dist_path, group)