mirror of https://github.com/axmolengine/axmol.git
Enable more tests for wasm
- box2d test beds - chipmunk test beds
This commit is contained in:
parent
3fa70d602b
commit
0c42b9370b
|
@ -449,7 +449,6 @@ macro (ax_setup_wasm_app_config app_name)
|
|||
"-sEXPORTED_FUNCTIONS=[_main]"
|
||||
"-sEXPORTED_RUNTIME_METHODS=[ccall,cwrap]"
|
||||
)
|
||||
message(STATUS "===== wasm app ${app_name} ${_APP_SOURCE_DIR}/index.html ... ")
|
||||
set(EMSCRIPTEN_LINK_FLAGS "-lidbfs.js -s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2 -s STACK_SIZE=4mb -s INITIAL_MEMORY=512MB --shell-file ${_APP_SOURCE_DIR}/index.html --use-preload-cache")
|
||||
# Disable wasm, generate js build?
|
||||
# string(APPEND EMSCRIPTEN_LINK_FLAGS " -s WASM=0")
|
||||
|
|
|
@ -404,7 +404,7 @@ list(APPEND GAME_SOURCE
|
|||
Source/Box2DTest/Box2dTest.cpp
|
||||
)
|
||||
|
||||
if((WINDOWS OR MACOSX OR LINUX) AND (NOT WINRT))
|
||||
if((WINDOWS OR MACOSX OR LINUX OR WASM) AND (NOT WINRT))
|
||||
list(APPEND GAME_HEADER
|
||||
Source/Box2DTestBed/tests/test.h
|
||||
Source/Box2DTestBed/tests/settings.h
|
||||
|
@ -493,42 +493,37 @@ list(APPEND GAME_SOURCE
|
|||
Source/ChipmunkTest/ChipmunkTest.cpp
|
||||
)
|
||||
|
||||
if(WINDOWS OR MACOSX OR LINUX)
|
||||
if(WINDOWS OR MACOSX OR LINUX OR WASM)
|
||||
list(APPEND GAME_HEADER
|
||||
Source/ChipmunkTestBed/demo/ChipmunkDemo.h
|
||||
Source/ChipmunkTestBed/ChipmunkTestBed.h
|
||||
)
|
||||
set (TESTBED_C_SORUCES
|
||||
Source/ChipmunkTestBed/demo/Bench.c
|
||||
Source/ChipmunkTestBed/demo/Chains.c
|
||||
Source/ChipmunkTestBed/demo/Convex.c
|
||||
Source/ChipmunkTestBed/demo/Crane.c
|
||||
Source/ChipmunkTestBed/demo/Joints.c
|
||||
Source/ChipmunkTestBed/demo/LogoSmash.c
|
||||
Source/ChipmunkTestBed/demo/OneWay.c
|
||||
Source/ChipmunkTestBed/demo/Planet.c
|
||||
Source/ChipmunkTestBed/demo/Player.c
|
||||
Source/ChipmunkTestBed/demo/Plink.c
|
||||
Source/ChipmunkTestBed/demo/Pump.c
|
||||
Source/ChipmunkTestBed/demo/PyramidStack.c
|
||||
Source/ChipmunkTestBed/demo/PyramidTopple.c
|
||||
Source/ChipmunkTestBed/demo/Shatter.c
|
||||
Source/ChipmunkTestBed/demo/Springies.c
|
||||
Source/ChipmunkTestBed/demo/Sticky.c
|
||||
Source/ChipmunkTestBed/demo/Tank.c
|
||||
Source/ChipmunkTestBed/demo/TheoJansen.c
|
||||
Source/ChipmunkTestBed/demo/Buoyancy.c
|
||||
Source/ChipmunkTestBed/demo/ContactGraph.c
|
||||
Source/ChipmunkTestBed/demo/Example.c
|
||||
Source/ChipmunkTestBed/demo/Query.c
|
||||
Source/ChipmunkTestBed/demo/Slice.c
|
||||
Source/ChipmunkTestBed/demo/Unicycle.c
|
||||
Source/ChipmunkTestBed/demo/Tumble.c)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
set_source_files_properties(${TESTBED_C_SORUCES} PROPERTIES COMPILE_FLAGS "/TP")
|
||||
else()
|
||||
set_source_files_properties(${TESTBED_C_SORUCES} PROPERTIES LANGUAGE CXX)
|
||||
endif()
|
||||
Source/ChipmunkTestBed/demo/Bench.cpp
|
||||
Source/ChipmunkTestBed/demo/Chains.cpp
|
||||
Source/ChipmunkTestBed/demo/Convex.cpp
|
||||
Source/ChipmunkTestBed/demo/Crane.cpp
|
||||
Source/ChipmunkTestBed/demo/Joints.cpp
|
||||
Source/ChipmunkTestBed/demo/LogoSmash.cpp
|
||||
Source/ChipmunkTestBed/demo/OneWay.cpp
|
||||
Source/ChipmunkTestBed/demo/Planet.cpp
|
||||
Source/ChipmunkTestBed/demo/Player.cpp
|
||||
Source/ChipmunkTestBed/demo/Plink.cpp
|
||||
Source/ChipmunkTestBed/demo/Pump.cpp
|
||||
Source/ChipmunkTestBed/demo/PyramidStack.cpp
|
||||
Source/ChipmunkTestBed/demo/PyramidTopple.cpp
|
||||
Source/ChipmunkTestBed/demo/Shatter.cpp
|
||||
Source/ChipmunkTestBed/demo/Springies.cpp
|
||||
Source/ChipmunkTestBed/demo/Sticky.cpp
|
||||
Source/ChipmunkTestBed/demo/Tank.cpp
|
||||
Source/ChipmunkTestBed/demo/TheoJansen.cpp
|
||||
Source/ChipmunkTestBed/demo/Buoyancy.cpp
|
||||
Source/ChipmunkTestBed/demo/ContactGraph.cpp
|
||||
Source/ChipmunkTestBed/demo/Example.cpp
|
||||
Source/ChipmunkTestBed/demo/Query.cpp
|
||||
Source/ChipmunkTestBed/demo/Slice.cpp
|
||||
Source/ChipmunkTestBed/demo/Unicycle.cpp
|
||||
Source/ChipmunkTestBed/demo/Tumble.cpp)
|
||||
list(APPEND GAME_SOURCE
|
||||
${TESTBED_C_SORUCES}
|
||||
Source/ChipmunkTestBed/ChipmunkTestBed.cpp
|
||||
|
|
|
@ -60,18 +60,18 @@ public:
|
|||
addTest("Audio - NewAudioEngine", []() { return new AudioEngineTests(); });
|
||||
|
||||
addTest("Box2D - Basic", []() { return new Box2DTests(); });
|
||||
#if defined(AX_PLATFORM_PC)
|
||||
#if defined(AX_PLATFORM_PC) || defined(__EMSCRIPTEN__)
|
||||
addTest("Box2D - TestBed", []() { return new Box2DTestBedTests(); });
|
||||
#endif
|
||||
addTest("Chipmunk2D - Basic", []() { return new ChipmunkTests(); });
|
||||
#if defined(AX_PLATFORM_PC)
|
||||
#if defined(AX_PLATFORM_PC) || defined(__EMSCRIPTEN__)
|
||||
addTest("Chipmunk2D - TestBed", []() { return new ChipmunkTestBedTests(); });
|
||||
#endif
|
||||
addTest("Bugs", []() { return new BugsTests(); });
|
||||
addTest("Click and Move", []() { return new ClickAndMoveTest(); });
|
||||
addTest("Configuration", []() { return new ConfigurationTests(); });
|
||||
addTest("Console", []() { return new ConsoleTests(); });
|
||||
#if !defined(AX_PLATFORM_WASM)
|
||||
#if !defined(__EMSCRIPTEN__)
|
||||
addTest("Curl", []() { return new CurlTests(); });
|
||||
#endif
|
||||
addTest("Current Language", []() { return new CurrentLanguageTests(); });
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "Box2DTestBed/Box2DTestBed.h"
|
||||
|
||||
#include "ChipmunkTest/ChipmunkTest.h"
|
||||
#if defined(AX_PLATFORM_PC)
|
||||
#if defined(AX_PLATFORM_PC) || defined(__EMSCRIPTEN__)
|
||||
# include "ChipmunkTestBed/ChipmunkTestBed.h"
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue