diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index 1545558e..8eeceafe 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -330,15 +330,16 @@ jobs:
           fetch-depth: ${{ env.git-depth }}
       - name: Checkout submodules
         run: git submodule update --init --recursive --depth 1
-      - uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee
-        with:
-          install-linux-dependencies: true
-          build-type: "Debug"
-          version: "3.2.4" # Should be equal or less than the version used by Emscripten
+      #- uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee
+      #  with:
+      #    install-linux-dependencies: true
+      #    build-type: "Debug"
+      #    version: "3.2.4" # Should be equal or less than the version used by Emscripten
       - uses: pypa/cibuildwheel@v3.0.0
         env:
           CIBW_BUILD: cp313-pyodide_wasm32
           CIBW_PLATFORM: pyodide
+          CIBW_TEST_COMMAND: python -c "import tcod.context"
       - name: Archive wheel
         uses: actions/upload-artifact@v4
         with:
diff --git a/build_sdl.py b/build_sdl.py
index 28069f2d..02c8b1d2 100755
--- a/build_sdl.py
+++ b/build_sdl.py
@@ -37,7 +37,6 @@
 # The SDL version to include in binary distributions.
 SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.2.16")
 
-
 # Used to remove excessive newlines in debug outputs.
 RE_NEWLINES = re.compile(r"\n\n+")
 # Functions using va_list need to be culled.
@@ -124,6 +123,9 @@
     )
 )
 
+CMAKE_CMD = ("emcmake", "cmake") if "PYODIDE" in os.environ else ("cmake",)
+CMAKE_FIND_SDL_CMD = (*CMAKE_CMD, "--find-package", "-D", "NAME=SDL3", "-D", "COMPILER_ID=GNU", "-D", "LANGUAGE=C")
+
 
 def check_sdl_version() -> None:
     """Check the local SDL3 version on Linux distributions."""
@@ -265,7 +267,13 @@ def get_emscripten_include_dir() -> Path:
     raise AssertionError(os.environ["PATH"])
 
 
-check_sdl_version()
+if "PYODIDE" in os.environ:
+    with TemporaryDirectory() as tmp_dir:
+        blank_source = Path(tmp_dir, "blank.c")
+        blank_source.write_text("")
+        subprocess.run(["emcc", "--use-port=sdl3", blank_source], check=True)
+
+# check_sdl_version()
 
 SDL_PARSE_PATH: Path | None = None
 SDL_BUNDLE_PATH: Path | None = None
@@ -279,11 +287,12 @@ def get_emscripten_include_dir() -> Path:
 elif sys.platform == "darwin" and SDL_PARSE_PATH is not None:
     SDL_INCLUDE = SDL_PARSE_PATH / "Versions/A/Headers"
 else:  # Unix
-    matches = re.findall(
-        r"-I(\S+)",
-        subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True),
-    )
-    assert matches
+    try:
+        out = subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True)
+    except Exception:
+        out = subprocess.check_output((*CMAKE_FIND_SDL_CMD, "-D", "MODE=COMPILE"), text=True)
+    matches = re.findall(r"-I(\S+)", out)
+    assert matches, out
 
     for match in matches:
         if Path(match, "SDL3/SDL.h").is_file():
@@ -399,6 +408,13 @@ def get_cdef() -> tuple[str, dict[str, str]]:
 
 if "PYODIDE" in os.environ:
     extra_compile_args += ["--use-port=sdl3"]
+    extra_link_args += ["--use-port=sdl3"]
+    extra_compile_args += (
+        subprocess.check_output((*CMAKE_FIND_SDL_CMD, "-D", "MODE=COMPILE"), text=True).strip().split()
+    )
+    extra_link_args += subprocess.check_output((*CMAKE_FIND_SDL_CMD, "-D", "MODE=LINK"), text=True).strip().split()
+    print(f"{extra_compile_args=}")
+    print(f"{extra_link_args=}")
 elif sys.platform not in ["win32", "darwin"]:
     # Use sdl-config to link to SDL on Linux.
     extra_compile_args += (
diff --git a/tcod/cffi.py b/tcod/cffi.py
index b0590d0e..863e2219 100644
--- a/tcod/cffi.py
+++ b/tcod/cffi.py
@@ -17,16 +17,15 @@
 
 REQUIRED_SDL_VERSION = (3, 2, 0)
 
-ffi_check = cffi.FFI()
-ffi_check.cdef(
-    """
-int SDL_GetVersion(void);
-"""
-)
-
 
 def verify_dependencies() -> None:
     """Try to make sure dependencies exist on this system."""
+    ffi_check = cffi.FFI()
+    ffi_check.cdef(
+        """
+    int SDL_GetVersion(void);
+    """
+    )
     if sys.platform == "win32":
         lib_test: Any = ffi_check.dlopen("SDL3.dll")  # Make sure SDL3.dll is here.
         int_version = lib_test.SDL_GetVersion()  # Need to check this version.
