@@ -293,25 +293,24 @@ def get_emscripten_include_dir() -> Path:
293
293
elif sys .platform == "darwin" and SDL_PARSE_PATH is not None :
294
294
SDL_INCLUDE = SDL_PARSE_PATH / "Versions/A/Headers"
295
295
else : # Unix
296
+ matches = []
296
297
try :
297
298
out = subprocess .check_output (["pkg-config" , "sdl3" , "--cflags" ], universal_newlines = True )
298
299
except Exception :
299
300
if "PYODIDE" in os .environ :
300
301
emcc_stdout = subprocess .check_output (["emcc" , "--use-port=sdl3" , "--cflags" ], text = True )
301
302
print (f"""EMCC CFLAGS: { emcc_stdout } """ )
302
- subprocess .run (
303
- ("find" , "/home/runner/.cache/cibuildwheel/emsdk-4.0.9/emsdk-4.0.9/upstream/emscripten/cache/sysroot" ),
304
- check = False ,
303
+ matches = re .findall (r"--sysroot=(\S+)" , emcc_stdout )
304
+ else :
305
+ cmake_out = subprocess .run (
306
+ (* CMAKE_FIND_SDL_CMD , "-D" , "MODE=COMPILE" ), check = False , text = True , stdout = subprocess .PIPE
305
307
)
306
-
307
- cmake_out = subprocess .run (
308
- (* CMAKE_FIND_SDL_CMD , "-D" , "MODE=COMPILE" ), check = False , text = True , stdout = subprocess .PIPE
309
- )
310
- print (f"{ cmake_out .stdout = } " )
311
- cmake_out .check_returncode ()
308
+ print (f"{ cmake_out .stdout = } " )
309
+ cmake_out .check_returncode ()
312
310
313
311
out = subprocess .check_output ((* CMAKE_FIND_SDL_CMD , "-D" , "MODE=COMPILE" ), text = True )
314
- matches = re .findall (r"-I(\S+)" , out )
312
+ if not matches :
313
+ matches = re .findall (r"-I(\S+)" , out )
315
314
if not matches :
316
315
matches = ["/usr/include" ]
317
316
0 commit comments