@@ -90,7 +90,9 @@ def check_sdl_version() -> None:
9090 return
9191 needed_version = f"{ SDL_MIN_VERSION [0 ]} .{ SDL_MIN_VERSION [1 ]} .{ SDL_MIN_VERSION [2 ]} "
9292 try :
93- sdl_version_str = subprocess .check_output (["sdl3-config" , "--version" ], universal_newlines = True ).strip ()
93+ sdl_version_str = subprocess .check_output (
94+ ["pkg-config" , "sdl3" , "--modversion" ], universal_newlines = True
95+ ).strip ()
9496 except FileNotFoundError as exc :
9597 msg = (
9698 "libsdl3-dev or equivalent must be installed on your system and must be at least version"
@@ -219,7 +221,7 @@ def on_directive_handle(
219221else : # Unix
220222 matches = re .findall (
221223 r"-I(\S+)" ,
222- subprocess .check_output (["sdl3 -config" , "--cflags" ], universal_newlines = True ),
224+ subprocess .check_output (["pkg -config" , "sdl3 " , "--cflags" ], universal_newlines = True ),
223225 )
224226 assert matches
225227
@@ -323,5 +325,9 @@ def get_cdef() -> str:
323325
324326# Use sdl-config to link to SDL on Linux.
325327if sys .platform not in ["win32" , "darwin" ]:
326- extra_compile_args += subprocess .check_output (["sdl3-config" , "--cflags" ], universal_newlines = True ).strip ().split ()
327- extra_link_args += subprocess .check_output (["sdl3-config" , "--libs" ], universal_newlines = True ).strip ().split ()
328+ extra_compile_args += (
329+ subprocess .check_output (["pkg-config" , "sdl3" , "--cflags" ], universal_newlines = True ).strip ().split ()
330+ )
331+ extra_link_args += (
332+ subprocess .check_output (["pkg-config" , "sdl3" , "--libs" ], universal_newlines = True ).strip ().split ()
333+ )
0 commit comments