/****************************************************************************

Copyright (c) 2010-2012 cocos2d-x.org

Copyright (c) 2013-2015 Chukong Technologies

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in

all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

THE SOFTWARE.

****************************************************************************/

#ifndef __BASE_CC_PLATFORM_CONFIG_H__

#define __BASE_CC_PLATFORM_CONFIG_H__

/// @cond DO_NOT_SHOW

/**

  Config of cocos2d-x project, per target platform.

  THIS FILE MUST NOT INCLUDE ANY OTHER FILE

*/

//////////////////////////////////////////////////////////////////////////

// pre configure

//////////////////////////////////////////////////////////////////////////

// define supported target platform macro which CC uses.

#define CC_PLATFORM_UNKNOWN            0

#define CC_PLATFORM_IOS                1

#define CC_PLATFORM_ANDROID            2

#define CC_PLATFORM_WIN32              3

#define CC_PLATFORM_MARMALADE          4

#define CC_PLATFORM_LINUX              5

#define CC_PLATFORM_BADA               6

#define CC_PLATFORM_BLACKBERRY         7

#define CC_PLATFORM_MAC                8

#define CC_PLATFORM_NACL               9

#define CC_PLATFORM_EMSCRIPTEN        10

#define CC_PLATFORM_TIZEN             11

#define CC_PLATFORM_QT5               12

#define CC_PLATFORM_WINRT             13

// Determine target platform by compile environment macro.

#define CC_TARGET_PLATFORM             CC_PLATFORM_UNKNOWN

// mac

#if defined(CC_TARGET_OS_MAC) || defined(__APPLE__)

#undef  CC_TARGET_PLATFORM

#define CC_TARGET_PLATFORM         CC_PLATFORM_MAC

#endif

// iphone

#if defined(CC_TARGET_OS_IPHONE)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_IOS

#endif

// android

#if defined(ANDROID)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_ANDROID

#endif

// win32

#if defined(_WIN32) && defined(_WINDOWS)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_WIN32

#endif

// linux

#if defined(LINUX) && !defined(__APPLE__)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM         CC_PLATFORM_LINUX

#endif

// marmalade

#if defined(MARMALADE)

#undef  CC_TARGET_PLATFORM

#define CC_TARGET_PLATFORM         CC_PLATFORM_MARMALADE

#endif

// bada

#if defined(SHP)

#undef  CC_TARGET_PLATFORM

#define CC_TARGET_PLATFORM         CC_PLATFORM_BADA

#endif

// qnx

#if defined(__QNX__)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM     CC_PLATFORM_BLACKBERRY

#endif

// native client

#if defined(__native_client__)

    #undef  CC_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

// tizen

#if defined(TIZEN)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM     CC_PLATFORM_TIZEN

#endif

// qt5

#if defined(CC_TARGET_QT5)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM     CC_PLATFORM_QT5

#endif

// WinRT (Windows 8.1 Store/Phone App)

#if defined(WINRT)

    #undef  CC_TARGET_PLATFORM

    #define CC_TARGET_PLATFORM          CC_PLATFORM_WINRT

#endif

//////////////////////////////////////////////////////////////////////////

// post configure

//////////////////////////////////////////////////////////////////////////

// check user set platform

#if ! CC_TARGET_PLATFORM

    #error  "Cannot recognize the target platform; are you targeting an unsupported platform?"

#endif 

#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)

#ifndef __MINGW32__

#pragma warning (disable:4127) 

#endif 

#endif  // CC_PLATFORM_WIN32

/// @endcond

#endif  // __BASE_CC_PLATFORM_CONFIG_H__

cocos2d-x C++ 判断当前平台宏定义大全的更多相关文章

  1. Unity各平台宏定义

    属性 方法 UNITY_EDITOR #define directive for calling Unity Editor scripts from your game code. UNITY_EDI ...

  2. iOS 日常工作之常用宏定义大全

    转自:http://www.jianshu.com/p/213b3b96cafe 前言: 在工作中, 很多小伙伴都会在PCH文件定义一些常用的宏,但是又怕写这些简单的宏浪费时间,又有时候忘记怎么定义了 ...

  3. iOS日常工作之常用宏定义大全

    前言: 在工作中, 很多小伙伴都会在PCH文件定义一些常用的宏,但是又怕写这些简单的宏浪费时间,又有时候忘记怎么定义了怎么办?本人在工作中也是如此.所以在这里给大家分享一些常用的宏定义,喜欢的小伙伴可 ...

  4. iOS常用宏定义大全

    宏定义与常量的区别 宏:只是在预处理器里进行文本替换,不做任何类型检查,宏能定义代码,const不能,多个宏编译时间相对较长,影响开发效率,调试过慢,const只会编译一次,缩短编译时间. 所以在使用 ...

  5. object-c 常用判断null的宏定义,如果是null直接返回@""

    #define checkNull(__X__) (__X__) == [NSNull null] || (__X__) == nil ? @"" : [NSString stri ...

  6. Unity 平台宏定义

    官方文档: https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

  7. Unity3D 多平台 预编译 宏定义

    平台定义 UNITY_EDITOR 编辑器调用. UNITY_STANDALONE_OSX 专门为Mac OS(包括Universal,PPC和Intelarchitectures)平台的定义. UN ...

  8. Unity3D 多平台_预编译相关宏定义

    http://www.cnblogs.com/zhaoqingqing/p/3510332.html API地址:http://docs.unity3d.com/Documentation/Manua ...

  9. C++通过宏定义判断操作系统及编译器

    INTRODUCTION: C++的编译环境千奇百怪,很多时候一些代码在某些编译环境下可用,一旦移到其他环境下,就会干脆Compile Error 对此,我们可以使用C++的宏定义来判断操作系统,从而 ...

随机推荐

  1. TCP协议和TCP/IP(簇)

    TCP协议(传输层) 用于应用程序之间的通信. 连接的建立是经过三次握手,断开的时候四次挥手. TCP 包头很复杂,但是主要关注五个问题,顺序问题,丢包问题,连接维护,流量控制,拥塞控制 状态位例如: ...

  2. [development][libhtp] libhtp 启用debug模式

    可以使用 ./configure --help 查看帮助. 可以通过参数, 修改配置. 即对应的Makefile内容. 也可以修改 configure.ac 里的内容, help中的部分内容, 也依赖 ...

  3. [development][dpdk][pktgen] 网卡收发包性能测试

    一: 多队列及中断信息收集 [root@T185 ~]# ethtool -g eth0 Ring parameters for eth0: Pre-set maximums: RX: RX Mini ...

  4. [CentOS7][ssh][publickey][troubleshoot] 通过密钥登录ssh故障排查

    通常情况下,我会使用非对称加密的方式来进行ssh的登录. 做法: 将公钥添加到 $HOME/.ssh/authorized_keys 文件中. 但是通常,会遇见各种各样的问题,导致失败.汇总如下: 0 ...

  5. Hash算法解决冲突的方法

    https://blog.csdn.net/feinik/article/details/54974293 Hash算法解决冲突的方法一般有以下几种常用的解决方法1, 开放定址法:所谓的开放定址法就是 ...

  6. pip的问题小结

    Q:同时安装py2和py3后,pip2不能用 A:使用:python2 -m pip install xxx  代替 pip2 install xxx 命令 Q:怎么用pip更新第三方包 A:pip2 ...

  7. [Android][Android Studio] Gradle项目中加入JNI生成文件(.so文件)

    版权声明:本文作者:Qiujuer https://github.com/qiujuer; 转载请注明出处,盗版必究! ! ! https://blog.csdn.net/qiujuer/articl ...

  8. caffe SSD目标检测lmdb数据格式制作

    一.任务 现在用caffe做目标检测一般需要lmdb格式的数据,而目标检测的数据和目标分类的lmdb格式的制作难度不同.就目标检测来说,例如准备SSD需要的数据,一般需要以下几步: 1.准备图片并标注 ...

  9. Kinect2.0获取数据

    最近事情真是多,今天抽空研究一下Kinec2.0的数据获取! 系统要求 https://developer.microsoft.com/en-us/windows/kinect/hardware-se ...

  10. nodejs, vue, webpack 项目实践

    vue 及 webpack,均不需要与nodejs一期使用,他们都可以单独使用到任何语言的框架中. http://jiongks.name/blog/just-vue/ https://cn.vuej ...