Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2011, 7:15:14 AM (14 years ago)
Author:
rgrieder
Message:

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
Location:
code/trunk/cmake/tools
Files:
1 deleted
9 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/tools/CheckOGREPlugins.cmake

    r8264 r8351  
    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/trunk/cmake/tools/FindALUT.cmake

    r7163 r8351  
    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
    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/trunk/cmake/tools/FindCEGUI.cmake

    r7163 r8351  
    44#  CEGUI_INCLUDE_DIR
    55#  CEGUI_LIBRARY, the library to link against to use CEGUI.
     6#  CEGUILUA_LIBRARY, the library to link against to use the CEGUI script module.
     7#  CEGUI_TOLUA_LIBRARY, the library to link against to use Tolua++.
    68#  CEGUI_FOUND, If false, do not try to use CEGUI
    79#  CEGUI_VERSION, the version as string "x.y.z"
    8 #  CEGUILUA_LIBRARY, Script module library
    9 #  CEGUILUA_USE_INTERNAL_LIBRARY, True if CEGUILUA_LIBRARY was not defined here
    1010#
    1111# Input:
    1212#  ENV{CEGUIDIR}, CEGUI path, optional
    13 #  FIND CEGUILUA_INTERNAL_SUPPORT, List of all CEGUILua version supported
    14 #                                  in the source repository
    15 #  CEGUILUA_USE_EXTERNAL_LIBRARY, Force finding of CEGUILua
    1613#
    1714# Created by Matt Williams to find OGRE libraries
     
    2926#                 > www.orxonox.net <
    3027
     28INCLUDE(CompareVersionStrings)
    3129INCLUDE(DetermineVersion)
    3230INCLUDE(FindPackageHandleAdvancedArgs)
    3331INCLUDE(HandleLibraryTypes)
    3432
     33# Find CEGUI headers
    3534FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    3635  PATHS $ENV{CEGUIDIR}
    37   PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
     36  PATH_SUFFIXES include include/CEGUI
    3837)
     38
     39# Inspect CEGUIVersion.h for the version number
     40DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     41
     42# Find CEGUI library
    3943FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
    4044  NAMES CEGUIBase CEGUI
     
    5054)
    5155
    52 # Inspect CEGUIVersion.h for the version number
    53 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
     56# Find CEGUILua headers
     57FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
     58  PATHS
     59    $ENV{CEGUIDIR}
     60    $ENV{CEGUILUADIR}
     61    ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
     62  PATH_SUFFIXES include include/CEGUI
     63)
     64# Find CEGUILua libraries
     65FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
     66  NAMES CEGUILua CEGUILuaScriptModule
     67  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
     68  PATH_SUFFIXES lib bin
     69)
     70FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
     71  NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d
     72  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
     73  PATH_SUFFIXES lib bin
     74)
     75
     76# Find CEGUI Tolua++ include file
     77# We only need to add this path since we use tolua++ like a normal
     78# dependency but it is shipped with CEGUILua.
     79FIND_PATH(CEGUI_TOLUA_INCLUDE_DIR tolua++.h
     80  PATHS
     81    ${CEGUILUA_INCLUDE_DIR}
     82    # For newer CEGUI versions >= 0.7
     83    ${CEGUILUA_INCLUDE_DIR}/support/tolua++
     84    # For Mac OS X, tolua++ is a separate framework in the dependency package
     85    ${DEP_FRAMEWORK_DIR}
     86  NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system
     87)
     88# Find CEGUI Tolua++ libraries
     89FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
     90  NAMES CEGUItoluapp tolua++ ceguitolua++
     91  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
     92  PATH_SUFFIXES lib bin
     93)
     94FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
     95  NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d
     96  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
     97  PATH_SUFFIXES lib bin
     98)
     99
     100# Newer versions of CEGUI have the renderer for OGRE shipped with them
     101COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE)
     102IF(_version_compare GREATER -1)
     103  # Find CEGUI OGRE Renderer headers
     104  FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h
     105    PATHS
     106      $ENV{CEGUIDIR}
     107      $ENV{CEGUIOGRERENDERERDIR}
     108      ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
     109    PATH_SUFFIXES include include/CEGUI
     110  )
     111  # Find CEGUI OGRE Renderer libraries
     112  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     113    NAMES CEGUIOgreRenderer
     114    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
     115    PATH_SUFFIXES lib bin
     116  )
     117  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
     118    NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d
     119    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
     120    PATH_SUFFIXES lib bin
     121  )
     122  SET(CEGUI_OGRE_RENDERER_REQUIRED_VARIABLES
     123    CEGUI_OGRE_RENDERER_INCLUDE_DIR
     124    CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     125  )
     126ELSE()
     127  SET(CEGUI_OLD_VERSION TRUE)
     128  SET(CEGUI_OGRE_RENDERER_BUILD_REQUIRED TRUE)
     129ENDIF()
    54130
    55131# Handle the REQUIRED argument and set CEGUI_FOUND
    56132# Also checks the version requirements if given
    57133FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}"
     134  CEGUI_INCLUDE_DIR
    58135  CEGUI_LIBRARY_OPTIMIZED
    59   CEGUI_INCLUDE_DIR
     136  CEGUILUA_INCLUDE_DIR
     137  CEGUILUA_LIBRARY_OPTIMIZED
     138  CEGUI_TOLUA_INCLUDE_DIR
     139  CEGUI_TOLUA_LIBRARY_OPTIMIZED
     140  ${CEGUI_OGRE_RENDERER_REQUIRED_VARIABLES}
    60141)
    61142
    62143# Collect optimized and debug libraries
    63144HANDLE_LIBRARY_TYPES(CEGUI)
     145HANDLE_LIBRARY_TYPES(CEGUILUA)
     146HANDLE_LIBRARY_TYPES(CEGUI_TOLUA)
     147IF(NOT CEGUI_OGRE_RENDERER_BUILD_REQUIRED)
     148  HANDLE_LIBRARY_TYPES(CEGUI_OGRE_RENDERER)
     149ENDIF()
    64150
    65151MARK_AS_ADVANCED(
     
    67153  CEGUI_LIBRARY_OPTIMIZED
    68154  CEGUI_LIBRARY_DEBUG
     155  CEGUILUA_INCLUDE_DIR
     156  CEGUILUA_LIBRARY_OPTIMIZED
     157  CEGUILUA_LIBRARY_DEBUG
     158  CEGUI_TOLUA_INCLUDE_DIR
     159  CEGUI_TOLUA_LIBRARY_OPTIMIZED
     160  CEGUI_TOLUA_LIBRARY_DEBUG
     161  CEGUI_OGRE_RENDERER_INCLUDE_DIR
     162  CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
     163  CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
    69164)
    70 
    71 LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result)
    72 IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
    73   # Also try to find the CEGUILua libraries.
    74   # There would already be libraries in src/ for versions 0.5 and 0.6
    75   FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    76     NAMES CEGUILua
    77     PATHS $ENV{CEGUIDIR}
    78     PATH_SUFFIXES lib bin
    79   )
    80   FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
    81     NAMES CEGUILuad CEGUILua_d
    82     PATHS $ENV{CEGUIDIR}
    83     PATH_SUFFIXES lib bin
    84   )
    85 
    86   SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED})
    87   # Handle the REQUIRED argument and set CEGUILUA_FOUND
    88   FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG
    89     CEGUILUA_LIBRARY_OPTIMIZED
    90   )
    91 
    92   # Collect optimized and debug libraries
    93   HANDLE_LIBRARY_TYPES(CEGUILUA)
    94 
    95   MARK_AS_ADVANCED(
    96     CEGUILUA_LIBRARY_OPTIMIZED
    97     CEGUILUA_LIBRARY_DEBUG
    98   )
    99 
    100 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
    101   SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE)
    102 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)
    103 
  • code/trunk/cmake/tools/FindOGRE.cmake

    r7163 r8351  
    2323FIND_PATH(OGRE_INCLUDE_DIR Ogre.h
    2424  PATHS $ENV{OGRE_HOME}
    25   PATH_SUFFIXES include include/OGRE Ogre.framework/Headers
     25  PATH_SUFFIXES include include/OGRE
    2626)
    2727FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED
     
    3333  NAMES OgreMaind OgreMain_d OgreMainD OgreMain_D Ogred Ogre_d OgreD Ogre_d
    3434  PATHS $ENV{OGRE_HOME}
    35   PATH_SUFFIXES lib bin/Debug bin/debug Debug debug Versions/A
     35  PATH_SUFFIXES lib bin/Debug bin/debug Debug debug
    3636)
    3737
  • code/trunk/cmake/tools/FindOgg.cmake

    r7163 r8351  
    2222)
    2323FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
    24   NAMES ogg
     24  NAMES ogg ogg-0 libogg
    2525  PATHS $ENV{OGGDIR}
    2626  PATH_SUFFIXES lib
    2727)
    2828FIND_LIBRARY(OGG_LIBRARY_DEBUG
    29   NAMES oggd ogg_d oggD ogg_D
     29  NAMES oggd ogg_d oggD ogg_D libogg_d
    3030  PATHS $ENV{OGGDIR}
    3131  PATH_SUFFIXES lib
  • code/trunk/cmake/tools/FindPOCO.cmake

    r7285 r8351  
    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/trunk/cmake/tools/FindVorbis.cmake

    r7163 r8351  
    2222)
    2323FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
    24   NAMES vorbis
     24  NAMES vorbis vorbis-0 libvorbis
    2525  PATHS $ENV{VORBISDIR}
    2626  PATH_SUFFIXES lib
    2727)
    2828FIND_LIBRARY(VORBIS_LIBRARY_DEBUG
    29   NAMES vorbisd vorbis_d vorbisD vorbis_D
     29  NAMES vorbisd vorbis_d vorbisD vorbis_D libvorbis_d
    3030  PATHS $ENV{VORBISDIR}
    3131  PATH_SUFFIXES lib
    3232)
    3333FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED
    34   NAMES vorbisfile
     34  NAMES vorbisfile vorbisfile-3 libvorbisfile
    3535  PATHS $ENV{VORBISDIR}
    3636  PATH_SUFFIXES lib
    3737)
    3838FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG
    39   NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D
     39  NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D libvorbisfile_d
    4040  PATHS $ENV{VORBISDIR}
    4141  PATH_SUFFIXES lib
  • code/trunk/cmake/tools/GenerateToluaBindings.cmake

    r7415 r8351  
    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/trunk/cmake/tools/TargetUtilities.cmake

    r8079 r8351  
    4343 #    Lists:
    4444 #      LINK_LIBRARIES:    Redirects to TARGET_LINK_LIBRARIES
     45 #      LINK_LIBS_LINUX:   Redirects to TARGET_LINK_LIBRARIES only on Linux
     46 #      LINK_LIBS_WIN32:   Redirects to TARGET_LINK_LIBRARIES only on Windows
     47 #      LINK_LIBS_APPLE:   Redirects to TARGET_LINK_LIBRARIES only on Apple
     48 #      LINK_LIBS_UNIX:    Redirects to TARGET_LINK_LIBRARIES only on UNIX
    4549 #      VERSION:           Set version to the binary
    4650 #      SOURCE_FILES:      Source files for the target
     
    5357 #    This function also installs the target!
    5458 #  Prerequisistes:
    55  #    ORXONOX_DEFAULT_LINK, ORXONOX_CONFIG_FILES
     59 #    ORXONOX_DEFAULT_LINK
    5660 #  Parameters:
    5761 #    _target_name, ARGN for the macro arguments
     
    8690  SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
    8791                  DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
    88                   PCH_EXCLUDE        OUTPUT_NAME)
     92                  PCH_EXCLUDE        OUTPUT_NAME       LINK_LIBS_LINUX
     93                  LINK_LIBS_WIN32    LINK_LIBS_APPLE   LINK_LIBS_UNIX)
    8994
    9095  PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN})
     
    104109        MESSAGE(FATAL_ERROR "No name provided for source file compilation")
    105110      ENDIF()
    106       IF(NOT _compilation_include_string)
    107         MESSAGE(STATUS "Warning: Empty source file compilation!")
    108       ENDIF()
    109111      IF(NOT DISABLE_COMPILATIONS)
     112        IF(NOT _compilation_include_string)
     113          MESSAGE(STATUS "Warning: Empty source file compilation!")
     114        ENDIF()
    110115        IF(EXISTS ${_compilation_file})
    111116          FILE(READ ${_compilation_file} _include_string_file)
     
    169174    GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files
    170175                            INPUTFILES ${_arg_TOLUA_FILES})
     176    # Workaround for XCode: The folder where the bind files are written to has
     177    # to be present beforehand.
     178    IF(CMAKE_CONFIGURATION_TYPES)
     179      FOREACH(_dir ${CMAKE_CONFIGURATION_TYPES})
     180        FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir})
     181      ENDFOREACH(_dir)
     182    ENDIF()
    171183  ENDIF()
    172184
     
    192204
    193205    IF(NOT _arg_ORXONOX_EXTERNAL)
    194       # Move the prereqs.h file to the config section
     206      # Move the ...Prereqs.h and the PCH files to the 'Config' section
    195207      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_target_name_capitalised}Prereqs.h)
    196208        SOURCE_GROUP("Config" FILES ${_target_name_capitalised}Prereqs.h)
    197209      ENDIF()
    198       # Add config files to the config section
    199       LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES})
    200       SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})
     210      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
     211        SOURCE_GROUP("Config" FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
     212      ENDIF()
    201213    ENDIF()
    202214  ENDIF()
     
    217229  IF(_arg_ORXONOX_EXTERNAL)
    218230    REMOVE_COMPILER_FLAGS("-W3 -W4" MSVC)
    219     ADD_COMPILER_FLAGS("-w")
     231    ADD_COMPILER_FLAGS("-w" NOT MSVC)
     232    ADD_COMPILER_FLAGS("-W0" MSVC)
    220233  ENDIF()
    221234
    222235  # Don't compile header files
    223236  FOREACH(_file ${_${_target_name}_files})
    224     IF(NOT _file MATCHES "\\.(c|cc|cpp|cxx)$")
     237    IF(NOT _file MATCHES "\\.(c|cc|cpp|cxx|mm)$")
    225238      SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES HEADER_FILE_ONLY TRUE)
    226239    ENDIF()
     
    278291    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES})
    279292  ENDIF()
     293  IF(_arg_LINK_LIBS_LINUX AND LINUX)
     294    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_LINUX})
     295  ENDIF()
     296  IF(_arg_LINK_LIBS_WIN32 AND WIN32)
     297    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_WIN32})
     298  ENDIF()
     299  IF(_arg_LINK_LIBS_APPLE AND APPLE)
     300    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_APPLE})
     301  ENDIF()
     302  IF(_arg_LINK_LIBS_UNIX AND UNIX)
     303    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_UNIX})
     304  ENDIF()
     305
     306  # RPATH settings for the installation
     307  IF("${_target_type}" STREQUAL "LIBRARY")
     308    IF(_arg_MODULE)
     309      SET(_rpath "${MODULE_RPATH}")
     310    ELSE()
     311      SET(_rpath "${LIBRARY_RPATH}")
     312    ENDIF()
     313  ELSE()
     314    SET(_rpath "${RUNTIME_RPATH}")
     315  ENDIF()
     316  SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
    280317
    281318  # DEFINE_SYMBOL
Note: See TracChangeset for help on using the changeset viewer.