Skip to content

Commit

Permalink
Combine EXPORTED_FUNCTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
patapancakes committed Jan 7, 2024
1 parent d3767c6 commit 49dce0a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ if(${PLAYER_BUILD_EXECUTABLE} AND ${PLAYER_TARGET_PLATFORM} MATCHES "^SDL(1|2)$"
"-sALLOW_MEMORY_GROWTH -sMINIFY_HTML=0 -sMODULARIZE -sEXPORT_NAME=createEasyRpgPlayer \
-sEXIT_RUNTIME --bind --pre-js ${PLAYER_JS_PREJS} --post-js ${PLAYER_JS_POSTJS} \
-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['$autoResumeAudioContext','$dynCall'] \
-sEXPORTED_FUNCTIONS=_main,_malloc,_free")
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_GetPlayerCoords,_SetGameLanguage,_SessionReady,_ToggleMute,_SetSoundVolume,_SetMusicVolume,_TogglePlayerSounds,_SetNametagMode,_SetSessionToken")
set_source_files_properties("src/platform/sdl/main.cpp" PROPERTIES
OBJECT_DEPENDS "${PLAYER_JS_PREJS};${PLAYER_JS_POSTJS};${PLAYER_JS_SHELL}")

Expand All @@ -1166,7 +1166,6 @@ if(${PLAYER_BUILD_EXECUTABLE} AND ${PLAYER_TARGET_PLATFORM} MATCHES "^SDL(1|2)$"

target_link_libraries(${EXE_NAME} "idbfs.js")
target_link_libraries(${EXE_NAME} "websocket.js")
set_property(TARGET ${EXE_NAME} APPEND_STRING PROPERTY LINK_FLAGS " -s EXPORTED_FUNCTIONS='[\"_GetPlayerCoords\",\"_SetGameLanguage\",\"_SessionReady\",\"_ToggleMute\",\"_SetSoundVolume\",\"_SetMusicVolume\",\"_TogglePlayerSounds\",\"_SetNametagMode\",\"_SetSessionToken\"]'")
set_property(TARGET ${EXE_NAME} APPEND_STRING PROPERTY LINK_FLAGS " -s EXPORTED_RUNTIME_METHODS='[\"ccall\",\"cwrap\",\"intArrayFromString\",\"ALLOC_NORMAL\",\"allocate\",\"getValue\"]'")
set_target_properties(${EXE_NAME} PROPERTIES OUTPUT_NAME "${PLAYER_JS_OUTPUT_NAME}")
endif()
Expand Down

0 comments on commit 49dce0a

Please sign in to comment.