mirror of https://github.com/axmolengine/axmol.git
Detect Apple platforms correctly.
This commit is contained in:
parent
c9306a053f
commit
bfb97739e2
|
@ -57,21 +57,15 @@ THE SOFTWARE.
|
||||||
#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN
|
#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN
|
||||||
|
|
||||||
// mac
|
// mac
|
||||||
#if defined(CC_TARGET_OS_MAC) || defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#undef CC_TARGET_PLATFORM
|
#include <TargetConditionals.h>
|
||||||
#define CC_TARGET_PLATFORM CC_PLATFORM_MAC
|
#if TARGET_OS_IPHONE // TARGET_OS_IPHONE inlcudes TARGET_OS_IOS TARGET_OS_TV and TARGET_OS_WATCH. see TargetConditionals.h
|
||||||
#endif
|
|
||||||
|
|
||||||
// ios
|
|
||||||
#if defined(CC_TARGET_OS_IPHONE)
|
|
||||||
#undef CC_TARGET_PLATFORM
|
#undef CC_TARGET_PLATFORM
|
||||||
#define CC_TARGET_PLATFORM CC_PLATFORM_IOS
|
#define CC_TARGET_PLATFORM CC_PLATFORM_IOS
|
||||||
#endif
|
#elif TARGET_OS_MAC
|
||||||
|
#undef CC_TARGET_PLATFORM
|
||||||
// tvOS
|
#define CC_TARGET_PLATFORM CC_PLATFORM_MAC
|
||||||
#if defined(CC_TARGET_OS_TVOS)
|
#endif
|
||||||
#undef CC_TARGET_PLATFORM
|
|
||||||
#define CC_TARGET_PLATFORM CC_PLATFORM_IOS
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// android
|
// android
|
||||||
|
|
Loading…
Reference in New Issue