Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3167


Ignore:
Timestamp:
Jun 14, 2009, 6:11:32 PM (15 years ago)
Author:
rgrieder
Message:

Merged the build system changes from the Gruppenarbeit:

  • More Comments (including Doxygen stuff for the config files)
  • Removed redundancy between PackageConfigMSVC.cmake and PackageConfigMinGW.cmake
  • Option ORXONOX_RELEASE which activates some expensive (build time) optimisations
  • Native Visual Leak Detector support (doesn't work for MSVC9 though)
  • Added CMake option to disable the console on Windows
Location:
code/branches/pch
Files:
2 added
15 edited
1 moved

Legend:

Unmodified
Added
Removed
  • code/branches/pch/bin/CMakeLists.txt

    r2762 r3167  
    3333  ENDFOREACH(_script)
    3434ENDIF()
     35# Also copy vld.ini (visual leak detector config) for MSVC
     36IF(MSVC)
     37  LIST(APPEND RUN_SCRIPTS vld.ini)
     38ENDIF()
    3539
    3640IF(NOT CMAKE_CONFIGURATION_TYPES)
    3741  SET(_subdirs .)
    38   SEt(_default_subdir .)
    3942ELSE()
    4043  SET(_subdirs ${CMAKE_CONFIGURATION_TYPES})
    41   SEt(_default_subdir Debug)
    4244ENDIF()
    4345STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY})
     
    5153  FOREACH(_script ${RUN_SCRIPTS})
    5254    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${_script}.in ${CURRENT_RUNTIME_DIR}/${_script} @ONLY)
    53     IF(_subdir STREQUAL _default_subdir)
    54       # Convenience script to be used when sitting in the binary directory. Defaults to Debug for msvc.
    55       CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${_script}.in ${CMAKE_BINARY_DIR}/${_script} @ONLY)
    56     ENDIF()
    5755  ENDFOREACH(_script)
    5856
  • code/branches/pch/cmake/BuildConfig.cmake

    r2896 r3167  
    7070ENDIF()
    7171
     72# Enable expensive optimisations: Use this for a binary release build
     73OPTION(ORXONOX_RELEASE "Enable when building restributable releases" FALSE)
     74
     75# Use WinMain() or main()?
     76OPTION(ORXONOX_USE_WINMAIN "Use WinMain (doesn't show console) or main" FALSE)
    7277
    7378################# OGRE Plugins ##################
  • code/branches/pch/cmake/BuildConfigMSVC.cmake

    r3117 r3167  
    3434######################## Options ########################
    3535
    36 IF(MSVC80)
    37   OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" FALSE)
    38 ENDIF(MSVC80)
     36# Currently VLD has a problem with MSVC9 although it actually is supported
     37IF(MSVC8)
     38  OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" off)
     39ENDIF()
     40# Make sure the value is "on" or "off" for vld.ini
     41IF(VISUAL_LEAK_DETECTOR_ENABLE)
     42  SET(VISUAL_LEAK_DETECTOR_ENABLE on)
     43ELSE()
     44  SET(VISUAL_LEAK_DETECTOR_ENABLE off)
     45ENDIF()
    3946
    4047# Orxonox only supports MSVC 8 and above, which gets asserted above
     
    6168
    6269# Overwrite CMake default flags here.
    63 SET_COMPILER_FLAGS("-MDd -Od -ZI -D_DEBUG -Gm -RTC1" Debug          CACHE)
     70SET_COMPILER_FLAGS("-MDd -Od -Zi -D_DEBUG -Gm -RTC1" Debug          CACHE)
    6471SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG -MP2"      Release        CACHE)
    6572SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG -MP2"      RelWithDebInfo CACHE)
     
    8996# Happens on STL member variables which are not public
    9097ADD_COMPILER_FLAGS("-w44251" CACHE)
     98ADD_COMPILER_FLAGS("-w44275" CACHE) # For inheritance
    9199
    92100# Multiple assignment operators specified
  • code/branches/pch/cmake/LibraryConfig.cmake

    r3159 r3167  
    6767    INCLUDE(PackageConfigMinGW)
    6868    INCLUDE(PackageConfigMSVC)
    69 
    70     # On Windows, DLLs have to be in the executable folder, install them
    71     IF(DEP_BINARY_DIR AND WIN32)
    72       # When installing a debug version, we really can't know which libraries
    73       # are used in released mode because there might be deps of deps.
    74       INSTALL(
    75         DIRECTORY ${DEP_BINARY_DIR}/
    76         DESTINATION bin
    77         CONFIGURATIONS Debug
    78         REGEX "^.*\\.pdb$" EXCLUDE
    79       )
    80 
    81       # Try to filter out all the debug libraries. If the regex doesn't do the
    82       # job anymore, simply adjust it.
    83       INSTALL(
    84         DIRECTORY ${DEP_BINARY_DIR}/
    85         DESTINATION bin
    86         CONFIGURATIONS Release RelWithDebInfo MinSizeRel
    87         REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
    88       )
    89     ENDIF(DEP_BINARY_DIR AND WIN32)
    90   ENDIF(NOT DEPENDENCY_PACKAGE_DIR)
     69    INCLUDE(PackageConfig) # For both msvc and mingw
     70  ENDIF()
    9171ENDIF(DEPENDENCY_PACKAGE_ENABLE)
    9272
  • code/branches/pch/cmake/PackageConfigMSVC.cmake

    r2710 r3167  
    2828IF(MSVC)
    2929
    30   # MAJOR: Interface breaking change somewhere or added a new library
    31   # MINOR: Updated a library to a new version
    32   # PATCH: Bug fix or smaller things
    33   SET(DEPENDENCY_VERSION 0.0.1)
    34 
    35   MESSAGE(STATUS "Using library package for the dependencies.")
    36 
    3730  # 64 bit system?
    3831  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     
    4538  STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?) .*$" "\\1"
    4639         _msvc_version "${CMAKE_GENERATOR}")
    47   IF(MSVC71)
    48     SET(_msvc_version "7.1")
    49   ENDIF(MSVC71)
    5040
    5141  SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include)
     
    6252  SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
    6353
    64   # Include paths and other special treatments
    65   SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut-1.1.0)
    66   SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost-1.37.0)
    67   SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui-0.6.2)
    68   SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx-2007.aug)
    69   SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet-1.2)
    70   SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua-5.1.4)
    71   SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg-1.1.3)
    72   SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis-1.2.0)
    73   SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre-1.4.9)
    74   SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
    75   SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal-1.1)
    76   LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl-8.5.2/include)
    77   SET(TCL_LIBRARY                ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    78   LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib-1.2.3/include)
    79   SET(ZLIB_LIBRARY               ${DEP_LIBRARY_DIR}/zdll.lib CACHE FILEPATH "")
     54  # Certain find scripts don't behave as ecpected to we have
     55  # to specify the libraries ourselves.
     56  SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
     57  SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     58
     59  # Visual Leak Detector
     60  SET(VLD_INCLUDE_DIR  ${DEP_INCLUDE_DIR}/vld-1.9h CACHE PATH "")
     61  SET(VLD_LIBRARY_DIR  ${DEP_LIBRARY_DIR}          CACHE PATH "")
     62  LINK_DIRECTORIES(${VLD_LIBRARY_DIR}) # Used for auto-linking
     63  MARK_AS_ADVANCED(VLD_INCLUDE_DIR VLD_LIBRARY_DIR)
    8064
    8165ENDIF(MSVC)
  • code/branches/pch/cmake/PackageConfigMinGW.cmake

    r2710 r3167  
    2828IF(MINGW)
    2929
    30   # MAJOR: Interface breaking change somewhere or added a new library
    31   # MINOR: Updated a library to a new version
    32   # PATCH: Bug fix or smaller things
    33   SET(DEPENDENCY_VERSION 0.0.1)
    34 
    35   MESSAGE(STATUS "Using library package for the dependencies.")
    36 
    3730  # 64 bit system?
    3831  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     
    5245  SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR} ${DEP_BINARY_DIR})
    5346
    54   # Include paths and other special treatments
    55   SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut-1.1.0)
    56   SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost-1.37.0)
    57   SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui-0.6.2)
    58   SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx-2007.aug)
    59   SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet-1.2)
    60   SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua-5.1.4)
    61   SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg-1.1.3)
    62   SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis-1.2.0)
    63   SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre-1.4.9)
    64   SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
    65   SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal-1.1)
    66   LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl-8.5.2/include)
    67   SET(TCL_LIBRARY                ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
    68   LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib-1.2.3/include)
    69   SET(ZLIB_LIBRARY               ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
     47  # Certain find scripts don't behave as ecpected to we have
     48  # to specify the libraries ourselves.
     49  SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
     50  SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
    7051
    7152ENDIF(MINGW)
  • code/branches/pch/cmake/PrecompiledHeaderFiles.cmake

    r3160 r3167  
    110110    GET_GCC_COMPILER_FLAGS(${_target_name} _pch_gcc_flags)
    111111    # Make sure we recompile the pch file even if only the flags change
    112     FILE(WRITE ${_pch_dep_helper_file} "/* ${_pch_gcc_flags} */")
     112    IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_PCH_GCC_FLAGS}")
     113      SET(_INTERNAL_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
     114      FILE(WRITE ${_pch_dep_helper_file} "/* ${_pch_gcc_flags} */")
     115    ENDIF()
    113116
    114117    # Set Compile flags for the other source files
     
    157160    ENDIF(CMAKE_COMPILER_IS_GNU)
    158161ENDFUNCTION(PRECOMPILED_HEADER_FILES_POST_TARGET)
    159 
    160 # TODO: Investigate what happens when we suddenly disable PCH for a library
    161 # TODO: C and CXX
  • code/branches/pch/cmake/TargetUtilities.cmake

    r3117 r3167  
    164164  IF(_arg_VERSION)
    165165    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES VERSION ${_arg_VERSION})
    166   ELSEIF(NOT ORXONOX_EXTERNAL)
     166  ELSEIF(NOT _arg_ORXONOX_EXTERNAL)
    167167    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES VERSION ${ORXONOX_VERSION})
    168168  ENDIF()
  • code/branches/pch/src/CMakeLists.txt

    r3116 r3167  
    2929ADD_COMPILER_FLAGS("-DOIS_DYNAMIC_LIB")
    3030# Tolua binding speedup if required
    31 ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" Release MinSizeRel TOLUA_PARSER_RELEASE)
     31ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" ORXONOX_RELEASE)
    3232
    3333# Default linking is SHARED
     
    7777
    7878SET(GENERATED_FILE_COMMENT
    79    "DO NOT EDIT THIS FILE!
     79   "DO NOT EDIT THIS FILE! <br>
    8080    It has been automatically generated by CMake from OrxonoxConfig.h.in")
    8181# Copy and configure OrxonoxConfig which gets included in every file
     
    108108  ${DIRECTX_INCLUDE_DIR}
    109109  ${ZLIB_INCLUDE_DIR}
     110  ${VLD_INCLUDE_DIR}
    110111
    111112  # All library includes are prefixed with the path to avoid conflicts
     
    152153ADD_SUBDIRECTORY(network)
    153154ADD_SUBDIRECTORY(orxonox)
    154 
    155 # Apply version info
    156 SET_TARGET_PROPERTIES(util core network orxonox
    157   PROPERTIES VERSION ${ORXONOX_VERSION})
  • code/branches/pch/src/OrxonoxConfig.h.in

    r3153 r3167  
    3434
    3535/**
    36  @file
    37  @brief
     36@file
     37@brief
    3838    Various constants for compiler, architecture and platform.
    39 
     39@remarks
    4040    @GENERATED_FILE_COMMENT@
    41  */
     41*/
    4242
    4343#ifndef _OrxonoxConfig_H__
     
    5252#cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
    5353
    54 /* Determine compiler and set ORXONOX_COMP_VER */
     54// Determine compiler and set ORXONOX_COMP_VER
    5555#if defined( _MSC_VER )
    5656#  define ORXONOX_COMPILER_MSVC
     
    7575#endif
    7676
    77 /* Endianness */
     77// Endianness
    7878#cmakedefine ORXONOX_BIG_ENDIAN
    7979#cmakedefine ORXONOX_LITTLE_ENDIAN
    8080
    81 /* Architecture */
     81// Architecture
    8282#cmakedefine ORXONOX_ARCH_32
    8383#cmakedefine ORXONOX_ARCH_64
    8484
    85 /* See if we can use __forceinline or if we need to use __inline instead */
     85// See if we can use __forceinline or if we need to use __inline instead
    8686#cmakedefine HAVE_FORCEINLINE
    8787#ifndef FORCEINLINE
     
    9393#endif
    9494
    95 /* Try to define function information */
     95// Try to define function information
    9696#ifndef __FUNCTIONNAME__
    9797#  ifdef ORXONOX_COMPILER_BORLAND
     
    115115#define ORXONOX_VERSION_NAME "@ORXONOX_VERSION_NAME@"
    116116
    117 #define ORXONOX_VERSION ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
     117//! Defines version info encoded as 0xMMIIPP (M: Major version, I: Minor version, P: Patch version, all as hex)
     118#define ORXONOX_VERSION \
     119    ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
    118120
    119121
     
    123125#ifdef ORXONOX_PLATFORM_UNIX
    124126
    125 /* TODO: Check what this actually is and whether we need it or not */
     127// TODO: Check what this actually is and whether we need it or not
    126128#if 0
    127129#  ifdef ORXONOX_PLATFORM_APPLE
    128130#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
    129 #  else
    130 /* ORXONOX_PLATFORM_LINUX */
     131#  else // ORXONOX_PLATFORM_LINUX
    131132#    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
    132133#  endif
     
    151152
    152153/*---------------------------------
    153  * Includes
    154  *-------------------------------*/
    155 /* Define the english written operators like and, or, xor
    156  * This is C++ standard, but the Microsoft compiler doesn't define them. */
     154 * Options
     155 *-------------------------------*/
     156/**
     157@def ORXONOX_RELEASE
     158    Enables expensive (build time) optimisations and disables certain features
     159*/
     160#cmakedefine ORXONOX_RELEASE
     161
     162
     163/*---------------------------------
     164 * Includes and Declarations
     165 *-------------------------------*/
     166// Define the english written operators like and, or, xor
     167// This is C++ standard, but the Microsoft compiler doesn't define them.
    157168#cmakedefine HAVE_ISO646_H
    158169#ifdef HAVE_ISO646_H
     
    181192*/
    182193
    183 /* Forward declare the everywhere used std::string */
     194// Always include the memory leak detector for MSVC except for actual releases
     195// Note: Although officially supported, VLD does not work with MSVC 9
     196#if defined(ORXONOX_COMPILER_MSVC) && _MSC_VER < 1500 && !defined(ORXONOX_RELEASE)
     197#  include <vld.h>
     198#endif
     199
     200// Forward declare the everywhere used std::string
    184201namespace std
    185202{
     
    190207}
    191208
    192 /* Just in case you don't include a standard header */
    193 #ifndef NULL
    194   #define NULL 0
    195 #endif
    196 
    197 /* Visual Leak Detector looks for memory leaks */
    198 #cmakedefine VISUAL_LEAK_DETECTOR_ENABLE
    199 #ifdef VISUAL_LEAK_DETECTOR_ENABLE
    200 #  include <vld.h>
    201 #endif
    202 
    203209#endif /* _OrxonoxConfig_H__ */
  • code/branches/pch/src/SpecialConfig.h.in

    r2946 r3167  
    2828
    2929/**
    30  @file
    31  @brief
     30@file
     31@brief
    3232    Various constants and options that only affect very little code.
    33  @note
     33@note
    3434    This is merely to avoid recompiling everything when only a path changes.
    35 
     35@remarks
    3636    @GENERATED_FILE_COMMENT@
    37  */
     37*/
    3838
    3939#ifndef _SpecialConfig_H__
     
    4242#include "OrxonoxConfig.h"
    4343
    44 /* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
     44/**
     45@def CEGUILUA_USE_INTERNAL_LIBRARY
     46    Set whether we must suffix "ceguilua/" for the CEGUILua.h include
     47*/
    4548#cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
    4649
    47 /* Defined if a precompiled depdency package was used. We then copy all libraries
    48    too when installing. */
     50/**
     51@def DEPENDENCY_PACKAGE_ENABLE
     52    Defined if a precompiled depdency package was used. We then copy all libraries
     53    too when installing.
     54*/
    4955#cmakedefine DEPENDENCY_PACKAGE_ENABLE
    5056
    51 /* Orxonox either gets installed to the system or just into a folder.
    52    The latter uses relative paths. */
     57/**
     58@def INSTALL_COPYABLE
     59    Orxonox either gets installed to the system or just into a folder.
     60    The latter uses relative paths.
     61*/
    5362#cmakedefine INSTALL_COPYABLE
    5463
    55 /* Using MSVC or XCode IDE */
     64/**
     65@def CMAKE_CONFIGURATION_TYPES
     66    Using MSVC or XCode IDE
     67*/
    5668#cmakedefine CMAKE_CONFIGURATION_TYPES
    5769
    58 /* Handle default ConfigValues */
     70// Handle default ConfigValues
    5971namespace orxonox
    6072{
    61     const char* const ORXONOX_RUNTIME_INSTALL_PATH("@ORXONOX_RUNTIME_INSTALL_PATH@");
    62     const char* const ORXONOX_MEDIA_INSTALL_PATH  ("@ORXONOX_MEDIA_INSTALL_PATH@");
     73    // INSTALLATION PATHS
     74    const char ORXONOX_RUNTIME_INSTALL_PATH[] = "@ORXONOX_RUNTIME_INSTALL_PATH@";
     75    const char ORXONOX_MEDIA_INSTALL_PATH[]   = "@ORXONOX_MEDIA_INSTALL_PATH@";
    6376    /* Config and Log path might be relative because they could be user and therefore runtime dependent */
    64     const char* const ORXONOX_CONFIG_INSTALL_PATH ("@ORXONOX_CONFIG_INSTALL_PATH@");
    65     const char* const ORXONOX_LOG_INSTALL_PATH    ("@ORXONOX_LOG_INSTALL_PATH@");
     77    const char ORXONOX_CONFIG_INSTALL_PATH[]  = "@ORXONOX_CONFIG_INSTALL_PATH@";
     78    const char ORXONOX_LOG_INSTALL_PATH[]     = "@ORXONOX_LOG_INSTALL_PATH@";
    6679
    67     const char* const ORXONOX_MEDIA_DEV_PATH      ("@CMAKE_MEDIA_OUTPUT_DIRECTORY@");
     80    // DEVELOPMENT RUN PATHS
     81    const char ORXONOX_MEDIA_DEV_PATH[]       = "@CMAKE_MEDIA_OUTPUT_DIRECTORY@";
    6882#ifdef CMAKE_CONFIGURATION_TYPES
    69     const char* const ORXONOX_CONFIG_DEV_PATH     ("@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" MACRO_QUOTEME(CMAKE_BUILD_TYPE));
    70     const char* const ORXONOX_LOG_DEV_PATH        ("@CMAKE_LOG_OUTPUT_DIRECTORY@/"    MACRO_QUOTEME(CMAKE_BUILD_TYPE));
     83    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" MACRO_QUOTEME(CMAKE_BUILD_TYPE);
     84    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@/"    MACRO_QUOTEME(CMAKE_BUILD_TYPE);
    7185#else
    72     const char* const ORXONOX_CONFIG_DEV_PATH     ("@CMAKE_CONFIG_OUTPUT_DIRECTORY@");
    73     const char* const ORXONOX_LOG_DEV_PATH        ("@CMAKE_LOG_OUTPUT_DIRECTORY@");
     86    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@";
     87    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@";
    7488#endif
    7589   
    7690    /* OGRE Plugins */
    7791#ifdef NDEBUG
    78     const char* const ORXONOX_OGRE_PLUGINS("@OGRE_PLUGINS_RELEASE@");
     92    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_RELEASE@";
    7993#  ifdef DEPENDENCY_PACKAGE_ENABLE
    80     const char* const ORXONOX_OGRE_PLUGINS_FOLDER(".");
     94    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = ".";
    8195#  else
    82     const char* const ORXONOX_OGRE_PLUGINS_FOLDER("@OGRE_PLUGINS_FOLDER_RELEASE@");
     96    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
    8397#  endif
    8498#else
    85     const char* const ORXONOX_OGRE_PLUGINS("@OGRE_PLUGINS_DEBUG@");
     99    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_DEBUG@";
    86100#  ifdef DEPENDENCY_PACKAGE_ENABLE
    87     const char* const ORXONOX_OGRE_PLUGINS_FOLDER(".");
     101    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = ".";
    88102#  else
    89     const char* const ORXONOX_OGRE_PLUGINS_FOLDER("@OGRE_PLUGINS_FOLDER_DEBUG@");
     103    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
    90104#  endif
    91105#endif
    92106}
    93107
     108/**
     109@def ORXONOX_USE_WINMAIN
     110    Use main() or WinMain()?
     111*/
     112#cmakedefine ORXONOX_USE_WINMAIN
     113
    94114#endif /* _SpecialConfig_H__ */
  • code/branches/pch/src/orxonox/CMakeLists.txt

    r3117 r3167  
    3333ADD_SUBDIRECTORY(tools)
    3434
     35# Translate argument
     36IF(ORXONOX_USE_WINMAIN)
     37  SET(ORXONOX_WIN32 WIN32)
     38ENDIF()
     39
    3540ORXONOX_ADD_EXECUTABLE(orxonox
    3641  FIND_HEADER_FILES
     
    4449    OrxonoxPrecompiledHeaders.h
    4550  PCH_NO_DEFAULT
     51  # When defined as WIN32 this removes the console window on Windows
     52  ${ORXONOX_WIN32}
    4653  LINK_LIBRARIES
    4754    ${OGRE_LIBRARY}
     
    8592  STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?) .*$" "\\1"
    8693         VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}")
    87   CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
     94  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
    8895ENDIF(MSVC)
  • code/branches/pch/src/orxonox/Main.cc

    r3110 r3167  
    2828 */
    2929 
    30  /**
    31  @mainpage Orxonox Documentation
    32  */
    33 
    34  /**
    35  @file
    36  @brief Entry point of the program.
    37   */
     30/**
     31@file
     32@brief
     33    Entry point of the program.
     34*/
    3835
    3936#include "OrxonoxConfig.h"
     
    4744    Main method. Game starts here (except for static initialisations).
    4845*/
     46#ifdef ORXONOX_USE_WINMAIN
     47INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
     48#else
    4949int main(int argc, char** argv)
     50#endif
    5051{
    5152    {
  • code/branches/pch/src/orxonox/sound/SoundBase.h

    r3157 r3167  
    3030
    3131#include "OrxonoxPrereqs.h"
     32#include <cstring> // define NULL
    3233
    3334namespace orxonox
  • code/branches/pch/src/tolua/CMakeLists.txt

    r3138 r3167  
    6161)
    6262
    63 OPTION(TOLUA_PARSER_RELEASE "Disable all debug messages from tolua bind files for Release and MinSizeRel build types." FALSE)
    64 
    6563# Set some variables to the cache in order to use them in the TOLUA macro
    6664SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/all-${LUA_VERSION}.lua" CACHE INTERNAL "")
Note: See TracChangeset for help on using the changeset viewer.