Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/OrxonoxConfig.h.in @ 2640

Last change on this file since 2640 was 2639, checked in by rgrieder, 16 years ago

Cleanup in OrxonoxConfig.h.in. Made use of various CMake features like CheckInclude or CheckCompiles to determine some options and macros in the config header file.

Also removed util/Integers.h and placed the code directory in OrxonoxConfig.h.in.

  • Property svn:eol-style set to native
File size: 4.7 KB
RevLine 
[682]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
[1505]3 *                    > www.orxonox.net <
[682]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:
[2639]23 *      Reto Grieder
24 *   Co-authors:
[1293]25 *      ...
[682]26 *
[1755]27 *   Original code: OgrePlatform.h, licensed under the LGPL. The code
[2639]28 *   has changed almost completely though.
[1755]29 *
[682]30 */
[1505]31
[682]32/**
[1032]33 @file
[1755]34 @brief
35    Various constants for compiler, architecture and platform.
[2639]36
37    @GENERATED_FILE_COMMENT@
[682]38 */
[1505]39
[2639]40#ifndef _OrxonoxConfig_H__
41#define _OrxonoxConfig_H__
[1505]42
[2639]43/*---------------------------------
44 * Platform and compiler related options
45 *-------------------------------*/
46#cmakedefine ORXONOX_PLATFORM_WINDOWS
47#cmakedefine ORXONOX_PLATFORM_LINUX
48#cmakedefine ORXONOX_PLATFORM_APPLE
49#cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
[1755]50
[2639]51/* Determine compiler and set ORXONOX_COMP_VER */
[1505]52#if defined( _MSC_VER )
[2639]53#  define ORXONOX_COMPILER_MSVC
[1505]54#  define ORXONOX_COMP_VER _MSC_VER
55
56#elif defined( __GNUC__ )
[2639]57#  define ORXONOX_COMPILER_GCC
[1505]58#  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
59        (__GNUC_MINOR__*10) + \
60        __GNUC_PATCHLEVEL__)
[2639]61#  if defined(__MINGW32__)
62#    define ORXONOX_COMPILER_MINGW
63#  endif
[1505]64
65#elif defined( __BORLANDC__ )
[2639]66#  define ORXONOX_COMPILER_BORLAND
[1505]67#  define ORXONOX_COMP_VER __BCPLUSPLUS__
68
69#else
[2639]70#  pragma error "No known compiler. Abort!"
[1505]71
72#endif
73
[2639]74/* Endianness */
75#cmakedefine ORXONOX_BIG_ENDIAN
76#cmakedefine ORXONOX_LITTLE_ENDIAN
[1755]77
[2639]78/* Architecture */
79#cmakedefine ORXONOX_ARCH_32
80#cmakedefine ORXONOX_ARCH_64
81
[1505]82/* See if we can use __forceinline or if we need to use __inline instead */
[2639]83#cmakedefine HAVE_FORCEINLINE
84#ifdef HAVE_FORCEINLINE
85#  define FORCEINLINE __forceinline
[1505]86#else
87#  define FORCEINLINE __inline
88#endif
89
[1755]90/* Try to define function information */
91#ifndef __FUNCTIONNAME__
[2639]92#  ifdef ORXONOX_COMPILER_BORLAND
[1755]93#    define __FUNCTIONNAME__ __FUNC__
[2639]94#  elif defined(ORXONOX_COMPILER_GCC)
[1755]95#    define __FUNCTIONNAME__ __PRETTY_FUNCTION__
[2639]96#  elif defined(ORXONOX_COMPILER_MSVC)
[1755]97#    define __FUNCTIONNAME__ __FUNCTION__
[1505]98#  else
[1755]99#    define __FUNCTIONNAME__
[1505]100#  endif
[1755]101#endif
[1505]102
[1755]103
[2639]104/*---------------------------------
105 * Version information
106 *-------------------------------*/
107#define ORXONOX_VERSION_MAJOR @ORXONOX_VERSION_MAJOR@
108#define ORXONOX_VERSION_MINOR @ORXONOX_VERSION_MINOR@
109#define ORXONOX_VERSION_PATCH @ORXONOX_VERSION_PATCH@
110#define ORXONOX_VERSION_NAME "@ORXONOX_VERSION_NAME@"
[1755]111
[1921]112#define ORXONOX_VERSION ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
113
114
[1755]115/*---------------------------------
[2639]116 * Unix settings
[1755]117 *-------------------------------*/
[2639]118#ifdef ORXONOX_PLATFORM_UNIX
[1505]119
[1755]120/* TODO: Check what this actually is and whether we need it or not */
121#if 0
[2639]122#  ifdef ORXONOX_PLATFORM_APPLE
[1505]123#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
124#  else
[1755]125/* ORXONOX_PLATFORM_LINUX */
[1505]126#    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
127#  endif
[1755]128#endif
[1505]129
[2639]130#endif /* Patform Unix */
[1505]131
132
[1755]133/*---------------------------------
134 * Apple Settings
135 *-------------------------------*/
[1505]136
137
[1755]138/*---------------------------------
[2639]139 * Includes
[1755]140 *-------------------------------*/
[2639]141/* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
142#cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
[1505]143
[2639]144/* Define the english written operators like and, or, xor
145 * This is C++ standard, but the Microsoft compiler doesn't define them. */
146#cmakedefine HAVE_CISO646
147#ifdef HAVE_CISO646
148#  include <ciso646>
149#endif
[1505]150
[2639]151#cmakedefine HAVE_CSTDINT
152#ifdef HAVE_CSTDINT
153#  include <cstdint>
154#elif defined(ORXONOX_COMPILER_MSVC)
155typedef __int8            int8_t;
156typedef __int16           int16_t;
157typedef __int32           int32_t;
158typedef __int64           int64_t;
159typedef unsigned __int8   uint8_t;
160typedef unsigned __int16  uint16_t;
161typedef unsigned __int32  uint32_t;
162typedef unsigned __int64  uint64_t;
163#endif
[1505]164
[2639]165#cmakedefine HAVE_CSTDDEF
166#ifdef HAVE_CSTDDEF
167#  include <cstddef>
168#endif
[1505]169
[2639]170/* Visual Leak Detector looks for memory leaks */
171#cmakedefine ACTIVATE_VISUAL_LEAK_DETECTOR
172#ifdef ACTIVATE_VISUAL_LEAK_DETECTOR
173#  include <vld.h>
174#endif
[1505]175
[2639]176#endif /* _OrxonoxConfig_H__ */
Note: See TracBrowser for help on using the repository browser.