Skip to content

Commit

Permalink
feat: #21 Revert old webgl asm method
Browse files Browse the repository at this point in the history
  • Loading branch information
ducphamhong committed Dec 8, 2019
1 parent 6f3d276 commit e17dd62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BuildEmscripten.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ cd ..
mkdir Bin\BuiltIn
copy Bin\BuiltIn.zip Bin\BuiltIn
mingw32-make -C PrjEmscripten
emrun --browser chrome Bin\MainApp.html
emrun --browser chrome Bin\MainApp.wasm.html
12 changes: 6 additions & 6 deletions Projects/MainApp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ endif()

# Emscripten
if (BUILD_EMSCRIPTEN)
#if(JS_ONLY)
if(JS_ONLY)
message(STATUS "Setting compilation target to native JavaScript")
set(CMAKE_EXECUTABLE_SUFFIX ".html")
set_target_properties(MainApp PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 -s FORCE_FILESYSTEM=1 -s FETCH=1 -s EXPORTED_FUNCTIONS=['_main'] --preload-file ../../../Bin/BuiltIn --shell-file shell.html --memory-init-file 1")
#else()
# message(STATUS "Setting compilation target to WASM")
# set(CMAKE_EXECUTABLE_SUFFIX ".wasm.html")
# set_target_properties(MainApp PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 -s FORCE_FILESYSTEM=1 -s FETCH=1 -s EXPORTED_FUNCTIONS=['_main'] --preload-file ../../../Bin/BuiltIn --shell-file shell.html --memory-init-file 1 -s WASM=1 -s BINARYEN_METHOD='native-wasm' ")
#endif()
else()
message(STATUS "Setting compilation target to WASM")
set(CMAKE_EXECUTABLE_SUFFIX ".wasm.html")
set_target_properties(MainApp PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 -s FORCE_FILESYSTEM=1 -s FETCH=1 -s EXPORTED_FUNCTIONS=['_main'] --preload-file ../../../Bin/BuiltIn --shell-file shell.html --memory-init-file 1 -s WASM=1 -s BINARYEN_METHOD='native-wasm'")
endif()
endif()

set_target_properties(MainApp PROPERTIES VERSION ${SKYLICHT_VERSION})
Expand Down

0 comments on commit e17dd62

Please sign in to comment.