mirror of https://github.com/axmolengine/axmol.git
Add #defines for Emscripten platform
This commit is contained in:
parent
5f195c131c
commit
30e3111bec
|
@ -199,6 +199,14 @@ THE SOFTWARE.
|
|||
#include "platform/nacl/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN)
|
||||
#include "platform/emscripten/CCAccelerometer.h"
|
||||
#include "platform/emscripten/CCApplication.h"
|
||||
#include "platform/emscripten/CCEGLView.h"
|
||||
#include "platform/emscripten/CCGL.h"
|
||||
#include "platform/emscripten/CCStdC.h"
|
||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN
|
||||
|
||||
// script_support
|
||||
#include "script_support/CCScriptSupport.h"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ enum TargetPlatform
|
|||
kTargetIpad,
|
||||
kTargetBlackBerry,
|
||||
kTargetNaCl,
|
||||
kTargetEmscripten
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,6 +44,7 @@ Config of cocos2d-x project, per target platform.
|
|||
#define CC_PLATFORM_BLACKBERRY 7
|
||||
#define CC_PLATFORM_MAC 8
|
||||
#define CC_PLATFORM_NACL 9
|
||||
#define CC_PLATFORM_EMSCRIPTEN 10
|
||||
|
||||
// Determine target platform by compile environment macro.
|
||||
#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN
|
||||
|
@ -102,6 +103,11 @@ Config of cocos2d-x project, per target platform.
|
|||
#define CC_TARGET_PLATFORM CC_PLATFORM_NACL
|
||||
#endif
|
||||
|
||||
// Emscripten
|
||||
#if defined(EMSCRIPTEN)
|
||||
#undef CC_TARGET_PLATFORM
|
||||
#define CC_TARGET_PLATFORM CC_PLATFORM_EMSCRIPTEN
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// post configure
|
||||
|
|
Loading…
Reference in New Issue