Skip to content

Commit 7817031

Browse files
authored
Fix SDL2 header access issue (#316)
1 parent aace669 commit 7817031

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,14 @@ if (XEUS_CPP_BUILD_EXECUTABLE)
431431
endif()
432432

433433
if(EMSCRIPTEN)
434+
# Ensure required SDL2 ports (e.g. SDL2) are built before header preloading
435+
execute_process(
436+
COMMAND embuilder build sdl2
437+
RESULT_VARIABLE SDL2_RESULT
438+
)
439+
if(NOT SDL2_RESULT EQUAL 0)
440+
message(FATAL_ERROR "Failed to run 'embuilder build sdl2'")
441+
endif()
434442
include(WasmBuildOptions)
435443
find_package(xeus-lite REQUIRED)
436444
add_executable(xcpp src/main_emscripten_kernel.cpp )

0 commit comments

Comments
 (0)