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

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. 蚂蚁金服研发的金融级分布式中间件SOFA背后的故事

    导读:GIAC大会期间,蚂蚁金服杨冰,黄挺等讲师面向华南技术社区做了<数字金融时代的云原生架构转型路径>和<从传统服务化走向Service Mesh>等演讲,就此机会,高可用架 ...

  2. RabbitMQ的Vhost,Exchange,Queue原理分析

    Vhost分析 RabbitMQ的Vhost主要是用来划分不同业务模块.不同业务模块之间没有信息交互. Vhost之间相互完全隔离,不同Vhost之间无法共享Exchange和Queue.因此Vhos ...

  3. php之函数

    scope(空间) unpack (解压) Traversable (穿越) performance(性能) experiment (检验) properties (属性) trailing (尾随) ...

  4. Calcite - StreamingSQL

    https://calcite.apache.org/docs/stream.html   Calcite's SQL is an extension to standard SQL, not ano ...

  5. C++生成静态库

    //StaticMath.h #include <iostream> class StaticMath { public: //StaticMath(void); //~StaticMat ...

  6. pyhton 爬虫爬去吾爱精品软件的信息并写入excel

    2018的最后一天了,感觉今年有得有失,这里就不再浪费时间了,愿2019万事如意 之前的爬虫信息下载后只写入txt文档,想到了以后工作加入有特殊需求,趁放假有时间将这写数据写入excel表格 以吾爱精 ...

  7. java上传文件代码

    import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;impo ...

  8. 常用的shell脚本(安全方向)

    更多shell脚本参考:https://blog.51cto.com/zero01/2046242 1.拒绝密码撞库攻击的ip shell脚本:实现对登录主机失败10次以上的ip进行拒绝登录 #! / ...

  9. npm 安装包报错 rollbackFailedOptional

    npm config rm proxynpm config rm https-proxy 然后使用npm install -g cnpm --registry=https://registry.npm ...

  10. OC转场动画UIViewControllerTransitioningDelegate

    该项目一共两个界面,第一个的只有一个SystemAnimationViewController只有UICollecitonView,第二个界面ImgDetailViewController只有一个UI ...