Skip to content

Commit 1e69fbb

Browse files
author
minggo
authored
will generate Xcode project on mac (#456)
1 parent 30b0386 commit 1e69fbb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugins/plugin_compile/project_compile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,8 @@ def build(self, platform):
889889
ios_cmake_toolchain_file = os.path.join(engine_dir, 'cmake/ios.toolchain.cmake')
890890
self._run_cmd('cmake %s -GXcode -DCMAKE_TOOLCHAIN_FILE=%s' %
891891
( os.path.relpath(cmakefile_dir, build_dir), ios_cmake_toolchain_file) )
892+
elif platform == 'mac':
893+
self._run_cmd('cmake -GXcode %s' % os.path.relpath(cmakefile_dir, build_dir))
892894
else:
893895
self._run_cmd('cmake %s' % os.path.relpath(cmakefile_dir, build_dir) )
894896

@@ -901,11 +903,10 @@ def build(self, platform):
901903
shutil.rmtree(output_dir)
902904
os.makedirs(output_dir)
903905

904-
mode = build_mode if platform != 'mac' else ''
905906
if cfg_obj.build_result_dir is not None:
906-
result_dir = os.path.join(build_dir, 'bin', cfg_obj.build_result_dir, self.project_name, mode)
907+
result_dir = os.path.join(build_dir, 'bin', cfg_obj.build_result_dir, self.project_name, build_mode)
907908
else:
908-
result_dir = os.path.join(build_dir, 'bin', self.project_name, mode)
909+
result_dir = os.path.join(build_dir, 'bin', self.project_name, build_mode)
909910
cocos.copy_files_in_dir(result_dir, output_dir)
910911

911912
# set application path and application name

0 commit comments

Comments
 (0)