From f4294c6abc40ba4a1133e668414c02ea2a3b8d54 Mon Sep 17 00:00:00 2001 From: shiwa Date: Fri, 9 Jun 2023 08:59:32 +0800 Subject: [PATCH] =?UTF-8?q?[tool][cdk.py]=20scons=E7=9A=84CDK=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=AE=8F=E5=AE=9A=E4=B9=89=E6=94=B9=E7=94=A8=E5=88=86?= =?UTF-8?q?=E5=8F=B7=E4=BD=9C=E5=88=86=E9=9A=94=E7=AC=A6=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81LIBS=20(#7610)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/cdk.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/cdk.py b/tools/cdk.py index 89e50839ad..8a473f7291 100644 --- a/tools/cdk.py +++ b/tools/cdk.py @@ -63,6 +63,7 @@ def _CDKProject(tree, target, script): CPPDEFINES = [] LINKFLAGS = '' CCFLAGS = '' + LIBS = [] ProjectFiles = [] for child in root: @@ -101,6 +102,8 @@ def _CDKProject(tree, target, script): LINKFLAGS += group['LINKFLAGS'] # todo: cdk add lib + if 'LIBS' in group and group['LIBS']: + LIBS += group['LIBS'] # write include path, definitions and link flags text = ';'.join([_make_path_relative(project_path, os.path.normpath(i)) for i in CPPPATH]) @@ -110,14 +113,20 @@ def _CDKProject(tree, target, script): IncludePath.text = text Define = tree.find('BuildConfigs/BuildConfig/Compiler/Define') - Define.text = ', '.join(set(CPPDEFINES)) + Define.text = '; '.join(set(CPPDEFINES)) CC_Misc = tree.find('BuildConfigs/BuildConfig/Compiler/OtherFlags') CC_Misc.text = CCFLAGS LK_Misc = tree.find('BuildConfigs/BuildConfig/Linker/OtherFlags') LK_Misc.text = LINKFLAGS - + + LibName = tree.find('BuildConfigs/BuildConfig/Linker/LibName') + if LibName.text: + LibName.text=LibName.text+';'+';'.join(LIBS) + else: + LibName.text=';'.join(LIBS) + xml_indent(root) out.write(etree.tostring(root, encoding='utf-8')) out.close()