88 return 1
89
90 impeller_cmake_dir = os.path.join(SRC_ROOT, args.path)
91
92 if args.setup:
93 git_command = [
94 'git',
95 '-C',
96 impeller_cmake_dir,
97 'submodule',
98 'update',
99 '--init',
100 '--recursive',
101 '--depth',
102 '1',
103 '--jobs',
104 str(os.cpu_count()),
105 ]
106 subprocess.check_call(git_command)
107
108
109 subprocess.check_call(['bash', 'deps.sh'], cwd=impeller_cmake_dir)
110 return 0
111
112 if args.cmake:
113 cmake_path = os.path.join(SRC_ROOT, 'buildtools', 'mac-x64', 'cmake', 'bin', 'cmake')
114 cmake_command = [
115 cmake_path,
116 '--preset',
117 'flutter-ci-mac-debug-x64',
118 '-B',
119 os.path.join(SRC_ROOT, 'out', 'impeller-cmake-example'),
120 ]
121 cmake_env = os.environ.copy()
122 ninja_path = os.path.join(SRC_ROOT, 'flutter', 'third_party', 'ninja')
123 cmake_env.update({
124 'PATH': os.environ['PATH'] + ':' + ninja_path,
125 'FLUTTER_ENGINE_SRC_DIR': SRC_ROOT,
126 })
127 if args.xcode_symlinks:
129 cmake_env.update({
130 'FLUTTER_OSX_SYSROOT': xcode_symlink_path,
131 })
132 subprocess.check_call(cmake_command, env=cmake_env, cwd=impeller_cmake_dir)
133
134 return 0
135
136
static void parse_args(int argc, char *argv[], Args *args)