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 @@ -1331,10 +1331,13 @@ def build_linux(self):
1331
1331
self .project_name = cfg_obj .project_name
1332
1332
else :
1333
1333
f = open (os .path .join (cmakefile_dir , 'CMakeLists.txt' ), 'r' )
1334
+ regexp_set_app_name = re .compile (r'\s*set\s*\(\s*APP_NAME' , re .IGNORECASE )
1334
1335
for line in f .readlines ():
1335
- if "set(APP_NAME " in line :
1336
- self .project_name = re .search ('APP_NAME ([^\)]+)\)' , line ).group (1 )
1336
+ if regexp_set_app_name . search ( line ) :
1337
+ self .project_name = re .search ('APP_NAME ([^\)]+)\)' , line , re . IGNORECASE ).group (1 )
1337
1338
break
1339
+ if hasattr (self , 'project_name' ) == False :
1340
+ raise cocos .CCPluginError ("Cauldn't find APP_NAME in CMakeLists.txt" )
1338
1341
1339
1342
if cfg_obj .build_dir is not None :
1340
1343
build_dir = os .path .join (project_dir , cfg_obj .build_dir )
You can’t perform that action at this time.
0 commit comments