Orxonox
0.0.5 Codename: Arcturus
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
OrxonoxConfig.h
Go to the documentation of this file.
1
/*
2
* ORXONOX - the hottest 3D action shooter ever to exist
3
* > www.orxonox.net <
4
*
5
*
6
* License notice:
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* as published by the Free Software Foundation; either version 2
11
* of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
*
22
* Author:
23
* Reto Grieder
24
* Co-authors:
25
* ...
26
*
27
* Original code: OgrePlatform.h, licensed under the LGPL. The code
28
* has changed almost completely though.
29
*
30
* Caution: Do not configure this file CMake configuration (Debug, Release, etc.)
31
* dependent! XCode and Visual Studio have the same file for all.
32
*
33
*/
34
44
#ifndef _OrxonoxConfig_H__
45
#define _OrxonoxConfig_H__
46
47
/*---------------------------------
48
* Platform and compiler related options
49
*-------------------------------*/
50
/* #undef ORXONOX_PLATFORM_WINDOWS */
51
#define ORXONOX_PLATFORM_LINUX
52
/* #undef ORXONOX_PLATFORM_APPLE */
53
#define ORXONOX_PLATFORM_UNIX
/* Apple and Linux */
54
55
// Determine compiler and set ORXONOX_COMP_VER
56
#if defined( _MSC_VER )
57
# define ORXONOX_COMPILER_MSVC
58
# define ORXONOX_COMP_VER _MSC_VER
59
60
#elif defined( __GNUC__ )
61
# define ORXONOX_COMPILER_GCC
62
# define ORXONOX_COMP_VER (((__GNUC__)*100) + \
63
(__GNUC_MINOR__*10) + \
64
__GNUC_PATCHLEVEL__)
65
# if defined(__MINGW32__)
66
# define ORXONOX_COMPILER_MINGW
67
# endif
68
69
#elif defined( __BORLANDC__ )
70
# define ORXONOX_COMPILER_BORLAND
71
# define ORXONOX_COMP_VER __BCPLUSPLUS__
72
73
#else
74
# pragma error "No known compiler. Abort!"
75
76
#endif
77
78
// Endianness
79
/* #undef ORXONOX_BIG_ENDIAN */
80
#define ORXONOX_LITTLE_ENDIAN
81
82
// Architecture
83
#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
84
# define ORXONOX_ARCH_64
85
#else
86
# define ORXONOX_ARCH_32
87
#endif
88
89
// See if we can use __forceinline or if we need to use __inline instead
90
/* #undef HAVE_FORCEINLINE */
91
#ifndef ORX_FORCEINLINE
92
# ifdef HAVE_FORCEINLINE
93
# define ORX_FORCEINLINE __forceinline
94
# else
95
# define ORX_FORCEINLINE __inline
96
# endif
97
#endif
98
99
// Try to define function information
100
#ifndef __FUNCTIONNAME__
101
# ifdef ORXONOX_COMPILER_BORLAND
102
# define __FUNCTIONNAME__ __FUNC__
103
# elif defined(ORXONOX_COMPILER_GCC)
104
# define __FUNCTIONNAME__ __PRETTY_FUNCTION__
105
# elif defined(ORXONOX_COMPILER_MSVC)
106
# define __FUNCTIONNAME__ __FUNCTION__
107
# else
108
# define __FUNCTIONNAME__
109
# endif
110
#endif
111
112
// Declare a function deprecated
113
#ifndef __DEPRECATED__
114
# if defined(ORXONOX_COMPILER_GCC)
115
# define __DEPRECATED__(function) function __attribute__ ((deprecated))
116
# elif defined(ORXONOX_COMPILER_MSVC)
117
# define __DEPRECATED__(function) __declspec(deprecated) function
118
# else
119
# define __DEPRECATED__(function) function
120
# endif
121
#endif
122
123
#ifndef __UNIQUE_NUMBER__
124
# if defined(ORXONOX_COMPILER_GCC) && ORXONOX_COMP_VER >= 430
125
# define __UNIQUE_NUMBER__ __COUNTER__
126
# elif defined(ORXONOX_COMPILER_MSVC)
127
# define __UNIQUE_NUMBER__ __COUNTER__
128
# else
129
# define __UNIQUE_NUMBER__ __LINE__
130
# endif
131
#endif
132
133
/*---------------------------------
134
* Version information
135
*-------------------------------*/
136
#define ORXONOX_VERSION_MAJOR 0
137
#define ORXONOX_VERSION_MINOR 0
138
#define ORXONOX_VERSION_PATCH 5
139
#define ORXONOX_VERSION_NAME "Arcturus"
140
142
#define ORXONOX_VERSION \
143
((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
144
145
146
/*---------------------------------
147
* Unix settings
148
*-------------------------------*/
149
#ifdef ORXONOX_PLATFORM_UNIX
150
151
// TODO: Check what this actually is and whether we need it or not
152
#if 0
153
# ifdef ORXONOX_PLATFORM_APPLE
154
# define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
155
# else // ORXONOX_PLATFORM_LINUX
156
# define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
157
# endif
158
#endif
159
160
#endif
/* Patform Unix */
161
162
163
/*---------------------------------
164
* Apple Settings
165
*-------------------------------*/
166
167
168
/*---------------------------------
169
* Includes and Declarations
170
*-------------------------------*/
171
// Define the english written operators like and, or, xor
172
// This is C++ standard, but the Microsoft compiler doesn't define them.
173
#define HAVE_ISO646_H
174
#ifdef HAVE_ISO646_H
175
# include <iso646.h>
176
#endif
177
178
// On OS X some headers already define HAVE_STDINT_H and that spits out
179
// some warnings. Therefore we use this macro.
180
// Note: This requires some extra code in OrxonoxConfig.cmake
181
#define ORX_HAVE_STDINT_H
182
#ifdef ORX_HAVE_STDINT_H
183
# include <stdint.h>
184
#elif defined(ORXONOX_COMPILER_MSVC)
185
typedef
__int8 int8_t;
186
typedef
__int16 int16_t;
187
typedef
__int32 int32_t;
188
typedef
__int64 int64_t;
189
typedef
unsigned
__int8 uint8_t;
190
typedef
unsigned
__int16 uint16_t;
191
typedef
unsigned
__int32 uint32_t;
192
typedef
unsigned
__int64 uint64_t;
193
#endif
194
195
#define HAVE_STDDEF_H
196
/* Quite large, do not include unless necessary
197
#ifdef HAVE_STDDEF_H
198
# include <stddef.h>
199
#endif
200
*/
201
202
// Configurations Release, RelWithDebInfo and MinSizeRel are designed for
203
// redistribution while RelForDevs is for development purposes
204
// ORXONOX_RELEASE simplifies this a little bit
205
#if defined(CMAKE_Release_BUILD) || defined(CMAKE_MinSizeRel_BUILD) \
206
|| defined(CMAKE_RelWithDebInfo_BUILD)
207
# define ORXONOX_RELEASE
208
#endif
209
210
// Define Boost Filesystem version
211
#include <boost/version.hpp>
212
#ifndef BOOST_FILESYSTEM_VERSION
213
# if (BOOST_VERSION < 104600)
214
# define BOOST_FILESYSTEM_VERSION 2
215
# else
216
# define BOOST_FILESYSTEM_VERSION 3
217
# endif
218
#endif
219
220
// CEGUI changed its file naming convention in version 0.8 thus we cannot even include CEGUI's Version.h file before knowing its version
221
#include </usr/include/cegui-0.8.4/CEGUI/Version.h>
222
#define CEGUI_VERSION ((CEGUI_VERSION_MAJOR << 16) | (CEGUI_VERSION_MINOR << 8) | CEGUI_VERSION_PATCH)
223
224
#endif
/* _OrxonoxConfig_H__ */
Generated on Fri Apr 12 2019 01:25:40 for Orxonox by
1.8.11