File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1341,10 +1341,13 @@ def build_linux(self):
1341
1341
self .project_name = cfg_obj .project_name
1342
1342
else :
1343
1343
f = open (os .path .join (cmakefile_dir , 'CMakeLists.txt' ), 'r' )
1344
+ regexp_set_app_name = re .compile (r'\s*set\s*\(\s*APP_NAME' , re .IGNORECASE )
1344
1345
for line in f .readlines ():
1345
- if "set(APP_NAME " in line :
1346
- self .project_name = re .search ('APP_NAME ([^\)]+)\)' , line ).group (1 )
1346
+ if regexp_set_app_name . search ( line ) :
1347
+ self .project_name = re .search ('APP_NAME ([^\)]+)\)' , line , re . IGNORECASE ).group (1 )
1347
1348
break
1349
+ if hasattr (self , 'project_name' ) == False :
1350
+ raise cocos .CCPluginError ("Cauldn't find APP_NAME in CMakeLists.txt" )
1348
1351
1349
1352
if cfg_obj .build_dir is not None :
1350
1353
build_dir = os .path .join (project_dir , cfg_obj .build_dir )
You can’t perform that action at this time.
0 commit comments