Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 6:58:23 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 7978 - 8096 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
1 deleted
16 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/cmake/CompilerConfig.cmake

    r5781 r8284  
    3434  MESSAGE(STATUS "Warning: Your compiler is not officially supported.")
    3535ENDIF()
    36 
    37 SET(COMPILER_CONFIG_USER_SCRIPT "" CACHE FILEPATH
    38     "Specify a CMake script if you wish to write your own compiler config.
    39      See CompilerConfigGCC.cmake or CompilerConfigMSVC.cmake for examples.")
    40 IF(COMPILER_CONFIG_USER_SCRIPT)
    41   IF(EXISTS ${CMAKE_MODULE_PATH}/${COMPILER_CONFIG_USER_SCRIPT})
    42     INCLUDE(${CMAKE_MODULE_PATH}/${COMPILER_CONFIG_USER_SCRIPT})
    43   ENDIF()
    44 ENDIF(COMPILER_CONFIG_USER_SCRIPT)
  • code/branches/kicklib2/cmake/CompilerConfigGCC.cmake

    r7458 r8284  
    2626INCLUDE(FlagUtilities)
    2727INCLUDE(CompareVersionStrings)
     28INCLUDE(CheckCXXCompilerFlag)
    2829
    2930# Shortcut for CMAKE_COMPILER_IS_GNUCXX and ..._GNUC
     
    3637  OUTPUT_VARIABLE GCC_VERSION
    3738)
    38 
    39 # Complain about incompatibilities
    40 COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.4.0" _compare_result)
    41 IF(NOT _compare_result LESS 0)
    42   IF(${Boost_VERSION} LESS 103700)
    43     MESSAGE(STATUS "Warning: Boost versions earlier than 1.37 may not compile with GCC 4.4 or later!")
    44   ENDIF()
    45 ENDIF()
    4639
    4740# GCC may not support #pragma GCC system_header correctly when using
     
    7265
    7366# CMake doesn't seem to set the PIC flags right on certain 64 bit systems
    74 IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
     67IF(NOT MINGW AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
    7568  ADD_COMPILER_FLAGS("-fPIC" CACHE)
     69ENDIF()
     70
     71# Use SSE if possible
     72# Commented because this might not work for cross compiling
     73#CHECK_CXX_COMPILER_FLAG(-msse _gcc_have_sse)
     74#IF(_gcc_have_sse)
     75#  ADD_COMPILER_FLAGS("-msse" CACHE)
     76#ENDIF()
     77
     78IF(NOT MINGW)
     79  # Have GCC visibility?
     80  CHECK_CXX_COMPILER_FLAG("-fvisibility=hidden" _gcc_have_visibility)
     81  IF(_gcc_have_visibility)
     82    # Note: There is a possible bug with the flag in gcc < 4.2 and Debug versions
     83    COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.2.0" _compare_result)
     84    IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" OR _compare_result GREATER -1)
     85      ADD_COMPILER_FLAGS("-DORXONOX_GCC_VISIBILITY -fvisibility=default -fvisibility-inlines-hidden" CACHE)
     86    ENDIF()
     87  ENDIF(_gcc_have_visibility)
    7688ENDIF()
    7789
  • code/branches/kicklib2/cmake/CompilerConfigMSVC.cmake

    r7818 r8284  
    6060
    6161# Overwrite CMake default flags here for the individual configurations
    62 SET_COMPILER_FLAGS("-MDd -Od -Zi -D_DEBUG -RTC1" Debug          CACHE)
    63 SET_COMPILER_FLAGS("-MD  -O2     -DNDEBUG"       Release        CACHE)
    64 SET_COMPILER_FLAGS("-MD  -O2 -Zi -DNDEBUG"       RelWithDebInfo CACHE)
    65 SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG"       MinSizeRel     CACHE)
    66 ADD_COMPILER_FLAGS("-D_SECURE_SCL=0"       MSVC9 ReleaseAll     CACHE)
     62SET_COMPILER_FLAGS("-MDd -Od -Oi -Zi -D_DEBUG -RTC1" Debug          CACHE)
     63SET_COMPILER_FLAGS("-MD  -O2         -DNDEBUG"       Release        CACHE)
     64SET_COMPILER_FLAGS("-MD  -O2     -Zi -DNDEBUG"       RelWithDebInfo CACHE)
     65SET_COMPILER_FLAGS("-MD  -O1         -DNDEBUG"       MinSizeRel     CACHE)
     66
     67# Enable non standard floating point optimisations
     68# Note: It hasn't been checked yet whether we have code that might break
     69#ADD_COMPILER_FLAGS("-fp:fast" CACHE)
     70
     71# No iterator checking for release builds (MSVC 8 dosn't understand this though)
     72ADD_COMPILER_FLAGS("-D_SECURE_SCL=0" ReleaseAll CACHE)
     73
     74# Newer MSVC versions come with std::shared_ptr which conflicts with
     75# boost::shared_ptr in cpptcl. And since we don't yet use the new C++ standard
     76# anyway, disable it completely.
     77ADD_COMPILER_FLAGS("-D_HAS_CPP0X=0" CACHE)
    6778
    6879# Use Link time code generation for Release config if ORXONOX_RELEASE is defined
  • code/branches/kicklib2/cmake/LibraryConfig.cmake

    r8283 r8284  
    4040# On Windows using a package causes way less problems
    4141SET(_option_msg "Set this to true to use precompiled dependecy archives")
    42 IF(WIN32)
     42IF(WIN32 OR APPLE)
    4343  OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" ON)
    44 ELSE(WIN32)
     44ELSE()
    4545  OPTION(DEPENDENCY_PACKAGE_ENABLE "${_option_msg}" FALSE)
    46 ENDIF(WIN32)
     46ENDIF()
    4747
    4848# Scripts for specific library and CMake config
    4949INCLUDE(LibraryConfigTardis)
    50 INCLUDE(LibraryConfigApple)
    5150
    5251IF(DEPENDENCY_PACKAGE_ENABLE)
     
    5958  ELSEIF(MSVC90)
    6059    SET(_compiler_prefix msvc9)
     60  ELSEIF(MSVC100)
     61    SET(_compiler_prefix msvc10)
    6162  ENDIF()
    6263  FIND_PATH(DEPENDENCY_PACKAGE_DIR
     
    7374                   "Disable LIBRARY_USE_PACKAGE if you have none intalled.")
    7475  ELSE()
    75     INCLUDE(PackageConfigMinGW)
    76     INCLUDE(PackageConfigMSVC)
    77     INCLUDE(PackageConfig) # For both msvc and mingw
     76    IF(WIN32)
     77      INCLUDE(PackageConfigMinGW)
     78      INCLUDE(PackageConfigMSVC)
     79      INCLUDE(PackageConfig) # For both msvc and mingw
     80    ELSEIF(APPLE)
     81      INCLUDE(PackageConfigOSX)
     82    ENDIF(WIN32)
    7883  ENDIF()
    7984ENDIF(DEPENDENCY_PACKAGE_ENABLE)
     
    141146
    142147##### Boost #####
    143 # Expand the next statement if newer boost versions than 1.36.1 are released
     148# Expand the next statement if newer boost versions are released
    144149SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 1.38 1.38.0 1.39 1.39.0 1.40 1.40.0
    145                               1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 1.44 1.44.0)
     150                              1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 1.44 1.44.0
     151                              1.45 1.45.0 1.46 1.46.0 1.46.1)
    146152IF( NOT TARDIS )
    147153  FIND_PACKAGE(Boost 1.35 REQUIRED thread filesystem system date_time)
     
    149155# No auto linking, so this option is useless anyway
    150156MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
     157# Complain about incompatibilities
     158IF(GCC_VERSION)
     159  COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.4.0" _compare_result)
     160  IF(NOT _compare_result LESS 0)
     161    IF(${Boost_VERSION} LESS 103700)
     162      MESSAGE(STATUS "Warning: Boost versions earlier than 1.37 may not compile with GCC 4.4 or later!")
     163    ENDIF()
     164  ENDIF()
     165ENDIF()
    151166
    152167
  • code/branches/kicklib2/cmake/PackageConfig.cmake

    r8283 r8284  
    2525 #
    2626
    27 # Check package version info
    28 # MAJOR: Breaking change
    29 # MINOR: No breaking changes by the dependency package
    30 #        For example any code running on 3.0 should still run on 3.1
    31 #        But you can specify that the code only runs on 3.1 and higher
    32 #        or 4.0 and higher (so both 3.1 and 4.0 will work).
    33 IF(MSVC)
    34   SET(ALLOWED_MINIMUM_VERSIONS 4.3 5.1 6.0)
    35 ELSE()
    36   SET(ALLOWED_MINIMUM_VERSIONS 4.1 5.2)
    37 ENDIF()
    38 
    39 IF(NOT EXISTS ${DEPENDENCY_PACKAGE_DIR}/version.txt)
    40   SET(DEPENDENCY_VERSION 1.0)
    41 ELSE()
    42   # Get version from file
    43   FILE(READ ${DEPENDENCY_PACKAGE_DIR}/version.txt _file_content)
    44   SET(_match)
    45   STRING(REGEX MATCH "([0-9]+.[0-9]+)" _match ${_file_content})
    46   IF(_match)
    47     SET(DEPENDENCY_VERSION ${_match})
    48   ELSE()
    49     MESSAGE(FATAL_ERROR "The version.txt file in the dependency file has corrupt version information.")
    50   ENDIF()
    51 ENDIF()
    52 
    53 INCLUDE(CompareVersionStrings)
    54 SET(_version_match FALSE)
    55 FOREACH(_version ${ALLOWED_MINIMUM_VERSIONS})
    56   # Get major version
    57   STRING(REGEX REPLACE "^([0-9]+)\\..*$" "\\1" _major_version "${_version}")
    58   COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${_major_version} _result TRUE)
    59   IF(_result EQUAL 0)
    60     COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${_version} _result FALSE)
    61     IF(NOT _result LESS 0)
    62       SET(_version_match TRUE)
    63     ENDIF()
    64   ENDIF()
    65 ENDFOREACH(_version)
    66 IF(NOT _version_match)
    67   MESSAGE(FATAL_ERROR "Your dependency package version is ${DEPENDENCY_VERSION}\n"
    68           "Possible required versions: ${ALLOWED_MINIMUM_VERSIONS}\n"
    69           "You can get a new version from www.orxonox.net")
    70 ENDIF()
    71 
    7227IF(NOT _INTERNAL_PACKAGE_MESSAGE)
    7328  MESSAGE(STATUS "Using library package for the dependencies.")
     
    7732# Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading
    7833COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
    79 IF(NOT _result EQUAL -1 AND NOT MINGW)
    80     SET(POCO_REQUIRED TRUE)
     34IF(NOT _result EQUAL -1 AND NOT APPLE)
     35  SET(POCO_REQUIRED TRUE)
    8136ENDIF()
    8237
  • code/branches/kicklib2/cmake/PackageConfigMSVC.cmake

    r7818 r8284  
    2828IF(MSVC)
    2929
     30  INCLUDE(CheckPackageVersion)
     31  CHECK_PACKAGE_VERSION(4.3 6.0)
     32
    3033  # 64 bit system?
    3134  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     
    3639
    3740  # Choose right MSVC version
    38   STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?) .*$" "\\1"
     41  STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?).*$" "\\1"
    3942         _msvc_version "${CMAKE_GENERATOR}")
    4043
     
    5659  SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    5760  SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     61  # Part of Platform SDK and usually gets linked automatically
     62  SET(WMI_LIBRARY  wbemuuid.lib)
    5863
    5964ENDIF(MSVC)
  • code/branches/kicklib2/cmake/PackageConfigMinGW.cmake

    r5781 r8284  
    2828IF(MINGW)
    2929
     30  INCLUDE(CheckPackageVersion)
     31  CHECK_PACKAGE_VERSION(6.0)
     32
    3033  # 64 bit system?
    3134  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     
    4851  # to specify the libraries ourselves.
    4952  SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
    50   SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
     53  SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/libzlib.dll CACHE FILEPATH "")
     54
     55  # Not included in MinGW, so we need to supply it for OIS
     56  SET(WMI_INCLUDE_DIR ${DEP_INCLUDE_DIR}/wmi/include)
     57  SET(WMI_LIBRARY     ${DEP_LIBRARY_DIR}/wbemuuid.lib)
    5158
    5259ENDIF(MINGW)
  • code/branches/kicklib2/cmake/tools/CheckOGREPlugins.cmake

    r8264 r8284  
    5252      NAMES ${_plugin}
    5353      PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR}
    54       PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin
     54      PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin Ogre.framework/Resources
    5555    )
    5656    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_DEBUG
    5757      NAMES ${_plugin}d ${_plugin}_d ${_plugin}
    5858      PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR}
    59       PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin
     59      PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin Ogre.framework/Resources
    6060    )
    6161    # We only need at least one render system. Check at the end.
  • code/branches/kicklib2/cmake/tools/FindALUT.cmake

    r7163 r8284  
    1 # - Locate FreeAlut
    2 # This module defines
    3 #  ALUT_LIBRARY
    4 #  ALUT_FOUND, if false, do not try to link against Alut
    5 #  ALUT_INCLUDE_DIR, where to find the headers
    6 #
    7 # $ALUTDIR is an environment variable that would
    8 # correspond to the ./configure --prefix=$ALUTDIR
    9 # used in building Alut.
    10 #
    11 # Created by Eric Wing. This was influenced by the FindSDL.cmake module.
    12 # On OSX, this will prefer the Framework version (if found) over others.
    13 # People will have to manually change the cache values of
    14 # ALUT_LIBRARY to override this selection.
    15 # Tiger will include OpenAL as part of the System.
    16 # But for now, we have to look around.
    17 # Other (Unix) systems should be able to utilize the non-framework paths.
    18 #
    19 # Several changes and additions by Fabian 'x3n' Landau
    20 # Some simplifications by Adrian Friedli and Reto Grieder
    21 #                 > www.orxonox.net <
     1 #
     2 #             ORXONOX - the hottest 3D action shooter ever to exist
     3 #                             > www.orxonox.net <
     4 #
     5 #        This program is free software; you can redistribute it and/or
     6 #         modify it under the terms of the GNU General Public License
     7 #        as published by the Free Software Foundation; either version 2
     8 #            of the License, or (at your option) any later version.
     9 #
     10 #       This program is distributed in the hope that it will be useful,
     11 #        but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 #                 GNU General Public License for more details.
     14 #
     15 #   You should have received a copy of the GNU General Public License along
     16 #      with this program; if not, write to the Free Software Foundation,
     17 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     18 #
     19 #
     20 #  Author:
     21 #    Kevin Young
     22 #  Description:
     23 #    Variables defined:
     24 #      ALUT_FOUND
     25 #      ALUT_INCLUDE_DIR
     26 #      ALUT_LIBRARY
     27 #
    2228
    2329INCLUDE(FindPackageHandleStandardArgs)
    2430INCLUDE(HandleLibraryTypes)
    2531
    26 FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h
    27   PATHS
    28   $ENV{ALUTDIR}
    29   ~/Library/Frameworks/OpenAL.framework
    30   /Library/Frameworks/OpenAL.framework
    31   /System/Library/Frameworks/OpenAL.framework # Tiger
    32   PATH_SUFFIXES include include/OpenAL include/AL Headers
     32FIND_PATH(ALUT_INCLUDE_DIR alut.h
     33  PATHS $ENV{ALUTDIR}
     34  PATH_SUFFIXES include include/AL Headers Headers/AL
    3335)
    34 
    35 # I'm not sure if I should do a special casing for Apple. It is
    36 # unlikely that other Unix systems will find the framework path.
    37 # But if they do ([Next|Open|GNU]Step?),
    38 # do they want the -framework option also?
    39 IF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
    40 
    41   STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR})
    42   IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
    43       OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
    44       )
    45     # String is in default search path, don't need to use -F
    46     SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
    47   ELSE()
    48     # String is not /Library/Frameworks, need to use -F
    49     SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
    50   ENDIF()
    51   # Clear the temp variable so nobody can see it
    52   SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "")
    53 
    54 ELSE()
    55   FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
    56     NAMES alut
    57     PATHS $ENV{ALUTDIR}
    58     PATH_SUFFIXES lib libs
    59   )
    60   FIND_LIBRARY(ALUT_LIBRARY_DEBUG
    61     NAMES alutd alut_d alutD alut_D
    62     PATHS $ENV{ALUTDIR}
    63     PATH_SUFFIXES lib libs
    64   )
    65 ENDIF()
     36FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
     37  NAMES alut ALUT
     38  PATHS $ENV{ALUTDIR}
     39  PATH_SUFFIXES lib bin/Release bin/release Release release ALUT
     40)
     41FIND_LIBRARY(ALUT_LIBRARY_DEBUG
     42  NAMES alutd alut_d alutD alut_D ALUTd ALUT_d ALUTD ALUT_D
     43  PATHS $ENV{ALUTDIR}
     44  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug ALUT
     45)
    6646
    6747# Handle the REQUIRED argument and set ALUT_FOUND
    6848FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
    69     ALUT_LIBRARY_OPTIMIZED
    70     ALUT_INCLUDE_DIR
     49  ALUT_LIBRARY_OPTIMIZED
     50  ALUT_INCLUDE_DIR
    7151)
    7252
     
    7555
    7656MARK_AS_ADVANCED(
    77     ALUT_INCLUDE_DIR
    78     ALUT_LIBRARY_OPTIMIZED
    79     ALUT_LIBRARY_DEBUG
     57  ALUT_INCLUDE_DIR
     58  ALUT_LIBRARY_OPTIMIZED
     59  ALUT_LIBRARY_DEBUG
    8060)
  • code/branches/kicklib2/cmake/tools/FindCEGUI.cmake

    r8283 r8284  
    3131INCLUDE(HandleLibraryTypes)
    3232
    33 # Find headers
     33# Find CEGUI headers
    3434FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    3535  PATHS $ENV{CEGUIDIR}
     
    4444  NAMES CEGUIBase CEGUI
    4545  PATHS $ENV{CEGUIDIR}
    46   PATH_SUFFIXES lib bin
     46  PATH_SUFFIXES lib bin CEGUIBase.framework CEGUI.framework
    4747)
    4848FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
     
    5454)
    5555
     56# Find CEGUILua headers
     57FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
     58  PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
     59  PATH_SUFFIXES include include/CEGUI CEGUILuaScriptModule.framework/Headers
     60)
    5661# Find CEGUILua libraries
    5762FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    5863  NAMES CEGUILua CEGUILuaScriptModule
    5964  PATHS $ENV{CEGUIDIR}
    60   PATH_SUFFIXES lib bin
     65  PATH_SUFFIXES lib bin CEGUILuaScriptModule.framework
    6166)
    6267FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
     
    6671)
    6772
     73# Find CEGUI Tolua++ include file
     74# We only need to add this path since we use tolua++ like a normal
     75# dependency but it is shipped with CEGUILua.
     76FIND_PATH(CEGUI_TOLUA_INCLUDE_DIR tolua++.h
     77  PATHS
     78    ${CEGUILUA_INCLUDE_DIR}
     79    # For newer CEGUI versions >= 0.7
     80    ${CEGUILUA_INCLUDE_DIR}/support/tolua++
     81    # For Apples
     82    $ENV{CEGUIDIR}
     83  PATH_SUFFIXES ceguitolua++.framework/Headers
     84  NO_DEFAULT_PATH # MUST be in CEGUILUA_INCLUDE_DIR somewhere
     85)
    6886# Find CEGUI Tolua++ libraries
    6987FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
    70   NAMES CEGUItoluapp tolua++
     88  NAMES CEGUItoluapp tolua++ ceguitolua++
    7189  PATHS $ENV{CEGUIDIR}
    72   PATH_SUFFIXES lib bin
     90  PATH_SUFFIXES lib bin ceguitolua++.framework
    7391)
    7492FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
     
    8199COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE)
    82100IF(_version_compare GREATER -1)
     101  # Find CEGUI OGRE Renderer headers
     102  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
     103    PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
     104    PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
     105  )
    83106  # Find CEGUI OGRE Renderer libraries
    84107  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     
    92115    PATH_SUFFIXES lib bin
    93116  )
    94   SET(CEGUI_OGRE_RENDERER_LIBRARY_NAME CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED)
     117  SET(CEGUI_OGRE_RENDERER_REQUIRED_VARIABLES
     118    CEGUI_OGRE_RENDERER_INCLUDE_DIR
     119    CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     120  )
    95121ELSE()
     122  SET(CEGUI_OLD_VERSION TRUE)
    96123  SET(CEGUI_OGRE_RENDERER_BUILD_REQUIRED TRUE)
    97124ENDIF()
     
    102129  CEGUI_INCLUDE_DIR
    103130  CEGUI_LIBRARY_OPTIMIZED
     131  CEGUILUA_INCLUDE_DIR
    104132  CEGUILUA_LIBRARY_OPTIMIZED
     133  CEGUI_TOLUA_INCLUDE_DIR
    105134  CEGUI_TOLUA_LIBRARY_OPTIMIZED
    106   ${CEGUI_OGRE_RENDERER_LIBRARY_NAME}
     135  ${CEGUI_OGRE_RENDERER_REQUIRED_VARIABLES}
    107136)
    108137
     
    119148  CEGUI_LIBRARY_OPTIMIZED
    120149  CEGUI_LIBRARY_DEBUG
     150  CEGUILUA_INCLUDE_DIR
    121151  CEGUILUA_LIBRARY_OPTIMIZED
    122152  CEGUILUA_LIBRARY_DEBUG
     153  CEGUI_TOLUA_INCLUDE_DIR
    123154  CEGUI_TOLUA_LIBRARY_OPTIMIZED
    124155  CEGUI_TOLUA_LIBRARY_DEBUG
     156  CEGUI_OGRE_RENDERER_INCLUDE_DIR
    125157  CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
    126158  CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
  • code/branches/kicklib2/cmake/tools/FindOgg.cmake

    r7163 r8284  
    2222)
    2323FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
    24   NAMES ogg
     24  NAMES ogg ogg-0
    2525  PATHS $ENV{OGGDIR}
    2626  PATH_SUFFIXES lib
  • code/branches/kicklib2/cmake/tools/FindPOCO.cmake

    r7285 r8284  
    2929FIND_PATH(POCO_INCLUDE_DIR Poco/Poco.h
    3030  PATHS $ENV{POCODIR}
    31   PATH_SUFFIXES include
     31  PATH_SUFFIXES include Foundation/include
    3232)
    3333FIND_LIBRARY(POCO_LIBRARY_OPTIMIZED
  • code/branches/kicklib2/cmake/tools/FindVorbis.cmake

    r7163 r8284  
    2222)
    2323FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
    24   NAMES vorbis
     24  NAMES vorbis vorbis-0
    2525  PATHS $ENV{VORBISDIR}
    2626  PATH_SUFFIXES lib
     
    3232)
    3333FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
    34   NAMES vorbisfile
     34  NAMES vorbisfile vorbisfile-3
    3535  PATHS $ENV{VORBISDIR}
    3636  PATH_SUFFIXES lib
  • code/branches/kicklib2/cmake/tools/GenerateToluaBindings.cmake

    r7415 r8284  
    3232 #    RUNTIME_LIBRARY_DIRECTORY - Working directory
    3333 #
     34
     35# Workaround for XCode: The folder where the bind files are written to has
     36# to be present beforehand.
     37# We have to do this here because the header files are all stored in a single
     38# location per configuration.
     39IF(CMAKE_CONFIGURATION_TYPES)
     40  FOREACH(_dir ${CMAKE_CONFIGURATION_TYPES})
     41    FILE(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/src/toluabind/${_dir}")
     42  ENDFOREACH(_dir)
     43ENDIF()
    3444
    3545FUNCTION(GENERATE_TOLUA_BINDINGS _tolua_package _target_source_files)
  • code/branches/kicklib2/cmake/tools/TargetUtilities.cmake

    r8079 r8284  
    5353 #    This function also installs the target!
    5454 #  Prerequisistes:
    55  #    ORXONOX_DEFAULT_LINK, ORXONOX_CONFIG_FILES
     55 #    ORXONOX_DEFAULT_LINK, ORXONOX_CONFIG_FILES, ORXONOX_CONFIG_FILES_GENERATED
    5656 #  Parameters:
    5757 #    _target_name, ARGN for the macro arguments
     
    169169    GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files
    170170                            INPUTFILES ${_arg_TOLUA_FILES})
     171    # Workaround for XCode: The folder where the bind files are written to has
     172    # to be present beforehand.
     173    IF(CMAKE_CONFIGURATION_TYPES)
     174      FOREACH(_dir ${CMAKE_CONFIGURATION_TYPES})
     175        FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir})
     176      ENDFOREACH(_dir)
     177    ENDIF()
    171178  ENDIF()
    172179
     
    192199
    193200    IF(NOT _arg_ORXONOX_EXTERNAL)
    194       # Move the prereqs.h file to the config section
     201      # Move the ...Prereqs.h and the PCH files to the 'Config' section
    195202      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_target_name_capitalised}Prereqs.h)
    196203        SOURCE_GROUP("Config" FILES ${_target_name_capitalised}Prereqs.h)
    197204      ENDIF()
    198       # Add config files to the config section
    199       LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES})
     205      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
     206        SOURCE_GROUP("Config" FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
     207      ENDIF()
     208      # Also include all config files
     209      LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES} ${ORXONOX_CONFIG_FILES_GENERATED})
     210      # Add unprocessed config files to the 'Config' section
    200211      SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})
     212      # Add generated config files to the 'Generated' section
     213      SOURCE_GROUP("Generated" FILES ${ORXONOX_CONFIG_FILES_GENERATED})
    201214    ENDIF()
    202215  ENDIF()
     
    217230  IF(_arg_ORXONOX_EXTERNAL)
    218231    REMOVE_COMPILER_FLAGS("-W3 -W4" MSVC)
    219     ADD_COMPILER_FLAGS("-w")
     232    ADD_COMPILER_FLAGS("-w" NOT MSVC)
     233    ADD_COMPILER_FLAGS("-W0" MSVC)
    220234  ENDIF()
    221235
    222236  # Don't compile header files
    223237  FOREACH(_file ${_${_target_name}_files})
    224     IF(NOT _file MATCHES "\\.(c|cc|cpp|cxx)$")
     238    IF(NOT _file MATCHES "\\.(c|cc|cpp|cxx|mm)$")
    225239      SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES HEADER_FILE_ONLY TRUE)
    226240    ENDIF()
Note: See TracChangeset for help on using the changeset viewer.