Skip to content

Commit 427332b

Browse files
committed
working on macOS build
1 parent 938f107 commit 427332b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

builder/macOS.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,8 @@ def build_sdl():
119119
elif os.path.exists(os.path.join(dst, 'libSDL2.a')):
120120
return
121121

122-
cwd = os.getcwd()
123-
os.chdir(dst)
124122
cmd_ = [
123+
f'cd {dst}'
125124
f'cmake -DSDL_STATIC=ON -DSDL_SHARED=OFF -DCMAKE_BUILD_TYPE=Release {SCRIPT_PATH}/lib/SDL &&'
126125
f'cmake --build . --config Release --parallel {os.cpu_count()}'
127126
]
@@ -130,8 +129,6 @@ def build_sdl():
130129
if res != 0:
131130
sys.exit(res)
132131

133-
os.chdir(cwd)
134-
135132

136133
def submodules():
137134
if not os.path.exists('lib/SDL/include'):
@@ -145,7 +142,7 @@ def submodules():
145142
]
146143
_run(cmd_)
147144

148-
cmd_ = ['cd lib/SDL && git checkout release-2.30.2']
145+
cmd_ = ['cd lib/SDL && git checkout release-2.30.2']
149146
_run(cmd_)
150147

151148
return_code, _ = spawn(submodules_cmd)
@@ -224,7 +221,6 @@ def compile(): # NOQA
224221

225222
build_sdl()
226223

227-
os.environ['CC'] = 'gcc'
228224
return_code, _ = spawn(compile_cmd)
229225
if return_code != 0:
230226
sys.exit(return_code)

0 commit comments

Comments
 (0)