File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ else() # Windows build relies on vcpkg
40
40
add_compile_definitions (SDL_MAIN_HANDLED)
41
41
endif ()
42
42
43
+ if (EMSCRIPTEN)
44
+ message (STATUS "Targeting Emscripten" )
45
+ # loguru tries to include excinfo.h, which is not available under Emscripten.
46
+ add_compile_definitions (LOGURU_STACKTRACES=0)
47
+ endif ()
48
+
43
49
option (DPPC_BUILD_PPC_TESTS "Build PowerPC tests" OFF )
44
50
option (DPPC_BUILD_BENCHMARKS "Build benchmarking programs" OFF )
45
51
@@ -118,6 +124,16 @@ add_executable(dingusppc ${SOURCES} $<TARGET_OBJECTS:core>
118
124
119
125
if (WIN32 )
120
126
target_link_libraries (dingusppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb)
127
+ elseif (EMSCRIPTEN)
128
+ target_link_libraries (dingusppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb
129
+ ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}
130
+ "-gsource-map"
131
+ # 256 MB max for emulated Mac RAM, plus 32 MB of emulator overhead
132
+ "-s INITIAL_MEMORY=301989888"
133
+ "-s MODULARIZE"
134
+ "-s EXPORT_ES6"
135
+ "-s EXPORT_NAME=emulator"
136
+ "-s 'EXTRA_EXPORTED_RUNTIME_METHODS=[\" FS\" ]'" )
121
137
else ()
122
138
target_link_libraries (dingusppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb
123
139
${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} )
You can’t perform that action at this time.
0 commit comments