Add #defines for Emscripten platform

This commit is contained in:
James Gregory 2013-04-03 18:28:27 -07:00
parent 5f195c131c
commit 30e3111bec
3 changed files with 15 additions and 0 deletions

View File

@ -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"

View File

@ -13,6 +13,7 @@ enum TargetPlatform
kTargetIpad,
kTargetBlackBerry,
kTargetNaCl,
kTargetEmscripten
};
/**

View File

@ -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