Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 7:43:10 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 8098 - 8277 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
13 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/cmake/CompilerConfigMSVC.cmake

    r8284 r8285  
    6868# Note: It hasn't been checked yet whether we have code that might break
    6969#ADD_COMPILER_FLAGS("-fp:fast" CACHE)
    70 
    71 # No iterator checking for release builds (MSVC 8 dosn't understand this though)
    72 ADD_COMPILER_FLAGS("-D_SECURE_SCL=0" ReleaseAll CACHE)
    7370
    7471# Newer MSVC versions come with std::shared_ptr which conflicts with
  • code/branches/kicklib2/cmake/LibraryConfig.cmake

    r8284 r8285  
    5858  ELSEIF(MSVC90)
    5959    SET(_compiler_prefix msvc9)
    60   ELSEIF(MSVC100)
     60  ELSEIF(MSVC10)
    6161    SET(_compiler_prefix msvc10)
    6262  ENDIF()
     
    9898# Performs the search and sets the variables    #
    9999
    100 FIND_PACKAGE(OGRE     1.6    REQUIRED)
    101 #FIND_PACKAGE(ENet     1.1    REQUIRED)
     100#FIND_PACKAGE(ENet     1.2    REQUIRED)
     101FIND_PACKAGE(CEGUI    0.6    REQUIRED)
    102102FIND_PACKAGE(Lua5.1          REQUIRED)
    103103FIND_PACKAGE(Ogg             REQUIRED)
     
    105105FIND_PACKAGE(ALUT            REQUIRED)
    106106FIND_PACKAGE(ZLIB            REQUIRED)
    107 IF(POCO_REQUIRED)
    108   FIND_PACKAGE(POCO          REQUIRED)
    109   # Always link against POCO too because of threading
    110   SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${POCO_LIBRARY})
    111 ENDIF()
     107
    112108IF(WIN32)
    113109  FIND_PACKAGE(DbgHelp)
     
    115111ENDIF()
    116112
    117 ##### CEGUI #####
    118 # We make use of the CEGUI script module called CEGUILua.
    119 # However there is a small issue with that: Both CEGUILua and Orxonox use
    120 # Lua library functions on the same objects. And it turns out that in this case
    121 # the linked library must be EXACTLY the same.
    122 # Since Lua v5.1 has been out for a long while, this does not seem to be a
    123 # problem anymore, at least as long as Lua 5.2 is not released.
    124 FIND_PACKAGE(CEGUI 0.6 REQUIRED)
    125113
    126114##### OpenAL #####
     
    147135##### Boost #####
    148136# Expand the next statement if newer boost versions are released
    149 SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 1.38 1.38.0 1.39 1.39.0 1.40 1.40.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)
    152 IF( NOT TARDIS )
    153   FIND_PACKAGE(Boost 1.35 REQUIRED thread filesystem system date_time)
     137SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.41 1.41.0 1.42 1.42.0 1.43 1.43.0
     138                              1.44 1.44.0 1.45 1.45.0 1.46 1.46.0 1.46.1)
     139IF(NOT TARDIS)
     140  FIND_PACKAGE(Boost 1.40 REQUIRED thread filesystem system date_time)
    154141ENDIF()
    155142# No auto linking, so this option is useless anyway
    156143MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
    157 # Complain about incompatibilities
    158 IF(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()
     144
     145##### OGRE #####
     146FIND_PACKAGE(OGRE 1.6 REQUIRED)
     147# For Ogre >= 1.7, we might need a threading library
     148# Variables are either defined by dependency package config or by FindOGRE
     149IF(OGRE_NEEDS_POCO)
     150  FIND_PACKAGE(POCO REQUIRED)
     151  # Always link against POCO too because of threading
     152  SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${POCO_LIBRARY})
     153ELSEIF(OGRE_NEEDS_BOOST)
     154  # Always link against boost too because of threading
     155  SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${Boost_THREAD_LIBRARY})
    165156ENDIF()
    166157
  • code/branches/kicklib2/cmake/PackageConfig.cmake

    r8284 r8285  
    3333COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
    3434IF(NOT _result EQUAL -1 AND NOT APPLE)
    35   SET(POCO_REQUIRED TRUE)
     35  SET(OGRE_NEEDS_POCO TRUE)
    3636ENDIF()
    3737
     
    7575
    7676  ## RELEASE
    77   # Try to filter out all the debug libraries. If the regex doesn't do the
    78   # job anymore, simply adjust it.
    79   INSTALL(
    80     DIRECTORY ${DEP_BINARY_DIR}/
    81     DESTINATION bin
    82     CONFIGURATIONS Release RelWithDebInfo MinSizeRel
    83     REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
    84   )
     77  IF(EXISTS ${DEP_BINARY_DIR}/install_manifest.txt)
     78    FILE(STRINGS ${DEP_BINARY_DIR}/install_manifest.txt _files)
     79    FOREACH(_file ${_files})
     80      INSTALL(
     81        FILES ${DEP_BINARY_DIR}/${_file}
     82        DESTINATION bin
     83        CONFIGURATIONS Release RelWithDebInfo MinSizeRel
     84      )
     85    ENDFOREACH(_file)
     86  ELSE()
     87    # Try to filter out all the debug libraries. If the regex doesn't do the
     88    # job anymore, simply adjust it.
     89    INSTALL(
     90      DIRECTORY ${DEP_BINARY_DIR}/
     91      DESTINATION bin
     92      CONFIGURATIONS Release RelWithDebInfo MinSizeRel
     93      REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
     94    )
     95  ENDIF()
    8596ENDIF()
  • code/branches/kicklib2/cmake/PackageConfigMSVC.cmake

    r8284 r8285  
    5757  # Certain find scripts don't behave as ecpected to we have
    5858  # to specify the libraries ourselves.
    59   SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    60   SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     59  IF(MSVC10)
     60    SET(TCL_LIBRARY
     61      optimized ${DEP_LIBRARY_DIR}/tcl85t.lib
     62      debug     ${DEP_LIBRARY_DIR}/tcl85tg.lib
     63      CACHE FILEPATH ""
     64    )
     65    SET(ZLIB_LIBRARY
     66      optimized ${DEP_LIBRARY_DIR}/zlib-vc100.lib
     67      debug     ${DEP_LIBRARY_DIR}/zlib-vc100_d.lib
     68      CACHE FILEPATH ""
     69    )
     70  ELSE()
     71    SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
     72    SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     73  ENDIF()
    6174  # Part of Platform SDK and usually gets linked automatically
    6275  SET(WMI_LIBRARY  wbemuuid.lib)
  • code/branches/kicklib2/cmake/PackageConfigOSX.cmake

    r8284 r8285  
    3030IF(NOT _INTERNAL_PACKAGE_MESSAGE)
    3131  MESSAGE(STATUS "Using library package for the dependencies.")
     32 
     33  # The following shell script sets the appropriate install_names for our libraries
     34  # and therefore it must be run before anything else is set, dep-package-wise.
     35  EXECUTE_PROCESS(
     36    COMMAND ${DEPENDENCY_PACKAGE_DIR}/install_dependencies.sh
     37    WORKING_DIRECTORY ${DEPENDENCY_PACKAGE_DIR}
     38    OUTPUT_FILE ${CMAKE_BINARY_DIR}/dep_pack_install_log.keep_me
     39  )
    3240  SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
    3341ENDIF()
    3442
    35 SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include)
    36 SET(DEP_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/lib)
    37 SET(DEP_BINARY_DIR  ${DEPENDENCY_PACKAGE_DIR}/bin)
     43SET(DEP_INCLUDE_DIR   ${DEPENDENCY_PACKAGE_DIR}/include)
     44SET(DEP_LIBRARY_DIR   ${DEPENDENCY_PACKAGE_DIR}/lib)
     45SET(DEP_BINARY_DIR    ${DEPENDENCY_PACKAGE_DIR}/bin)
    3846SET(DEP_FRAMEWORK_DIR ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
    3947
    40 # Sets the library path for the FIND_LIBRARY
    41 SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
     48# Sets the library and framwork paths for the FIND_LIBRARY commands
     49SET(CMAKE_LIBRARY_PATH   ${DEP_LIBRARY_DIR})
     50SET(CMAKE_FRAMEWORK_PATH ${DEP_FRAMEWORK_DIR})
    4251
    4352# Include paths and other special treatments
    44 SET(ENV{ALUTDIR}               ${DEP_FRAMEWORK_DIR})
    45 SET(ENV{BOOST_ROOT}            ${DEPENDENCY_PACKAGE_DIR})
    46 SET(ENV{CEGUIDIR}              ${DEP_FRAMEWORK_DIR})
    47 SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
    48 SET(ENV{LUA5.1_DIR}            ${DEP_INCLUDE_DIR}/lua)
    49 SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR})
    50 SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR})
    51 SET(ENV{OGRE_HOME}             ${DEP_FRAMEWORK_DIR})
    52 SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
     53SET(ENV{BOOST_ROOT}      ${DEPENDENCY_PACKAGE_DIR})
     54SET(ENV{OGGDIR}          ${DEP_INCLUDE_DIR})
     55SET(ENV{VORBISDIR}       ${DEP_INCLUDE_DIR})
     56SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR})
     57
     58# Linking to OGRE requires linking to the boost threading library
     59SET(OGRE_NEEDS_BOOST TRUE)
    5360
    5461# For OS X 10.5 we have to ship modified headers to make it compile
     
    5966ENDIF()
    6067
    61 # Xcode won't be able to run the toluabind code generation if we're using the dependency package
    62 #IF(DEPENDENCY_PACKAGE_ENABLE)
    63 #  IF(${CMAKE_GENERATOR} STREQUAL "Xcode")
    64 #    SET(ENV{DYLD_LIBRARY_PATH}               ${DEPENDENCY_PACKAGE_DIR}/lib)
    65 #    SET(ENV{DYLD_FRAMEWORK_PATH}             ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
    66 #  ENDIF(${CMAKE_GENERATOR} STREQUAL "Xcode")
    67 #ENDIF(DEPENDENCY_PACKAGE_ENABLE)
    68 
    6968### INSTALL ###
    7069
    7170# Tcl script library
    7271# TODO: How does this work on OS X?
     72# Concerning all OS X install procedures: use CPACK
    7373#INSTALL(
    7474#  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
  • code/branches/kicklib2/cmake/tools/FindALUT.cmake

    r8284 r8285  
    3232FIND_PATH(ALUT_INCLUDE_DIR alut.h
    3333  PATHS $ENV{ALUTDIR}
    34   PATH_SUFFIXES include include/AL Headers Headers/AL
     34  PATH_SUFFIXES include include/AL
    3535)
    3636FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
  • code/branches/kicklib2/cmake/tools/FindCEGUI.cmake

    r8284 r8285  
    3434FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
    3535  PATHS $ENV{CEGUIDIR}
    36   PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
     36  PATH_SUFFIXES include include/CEGUI
    3737)
    3838
     
    4444  NAMES CEGUIBase CEGUI
    4545  PATHS $ENV{CEGUIDIR}
    46   PATH_SUFFIXES lib bin CEGUIBase.framework CEGUI.framework
     46  PATH_SUFFIXES lib bin
    4747)
    4848FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
     
    5656# Find CEGUILua headers
    5757FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h
    58   PATHS $ENV{CEGUIDIR} ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
    59   PATH_SUFFIXES include include/CEGUI CEGUILuaScriptModule.framework/Headers
     58  PATHS
     59    $ENV{CEGUIDIR}
     60    $ENV{CEGUILUADIR}
     61    ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule
     62  PATH_SUFFIXES include include/CEGUI
    6063)
    6164# Find CEGUILua libraries
    6265FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
    6366  NAMES CEGUILua CEGUILuaScriptModule
    64   PATHS $ENV{CEGUIDIR}
    65   PATH_SUFFIXES lib bin CEGUILuaScriptModule.framework
     67  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
     68  PATH_SUFFIXES lib bin
    6669)
    6770FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG
    6871  NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d
    69   PATHS $ENV{CEGUIDIR}
     72  PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR}
    7073  PATH_SUFFIXES lib bin
    7174)
     
    7982    # For newer CEGUI versions >= 0.7
    8083    ${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
     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
    8587)
    8688# Find CEGUI Tolua++ libraries
    8789FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
    8890  NAMES CEGUItoluapp tolua++ ceguitolua++
    89   PATHS $ENV{CEGUIDIR}
    90   PATH_SUFFIXES lib bin ceguitolua++.framework
     91  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
     92  PATH_SUFFIXES lib bin
    9193)
    9294FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG
    9395  NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d
    94   PATHS $ENV{CEGUIDIR}
     96  PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR}
    9597  PATH_SUFFIXES lib bin
    9698)
     
    101103  # Find CEGUI OGRE Renderer headers
    102104  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    PATHS
     106      $ENV{CEGUIDIR}
     107      $ENV{CEGUIOGRERENDERERDIR}
     108      ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre
     109    PATH_SUFFIXES include include/CEGUI
    105110  )
    106111  # Find CEGUI OGRE Renderer libraries
    107112  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED
    108113    NAMES CEGUIOgreRenderer
    109     PATHS $ENV{CEGUIDIR}
     114    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
    110115    PATH_SUFFIXES lib bin
    111116  )
    112117  FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG
    113118    NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d
    114     PATHS $ENV{CEGUIDIR}
     119    PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR}
    115120    PATH_SUFFIXES lib bin
    116121  )
  • code/branches/kicklib2/cmake/tools/FindLua5.1.cmake

    r8283 r8285  
    5656# Find include path
    5757FIND_PATH(LUA5.1_INCLUDE_DIR lua.h
    58   PATHS $ENV{LUA5.1_DIR}
     58  PATHS $ENV{LUA5.1_DIR} $ENV{LUA_DIR}
    5959  PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
    6060)
  • code/branches/kicklib2/cmake/tools/FindOGRE.cmake

    r7163 r8285  
    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/branches/kicklib2/cmake/tools/FindOgg.cmake

    r8284 r8285  
    2222)
    2323FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED
    24   NAMES ogg ogg-0
     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/branches/kicklib2/cmake/tools/FindVorbis.cmake

    r8284 r8285  
    2222)
    2323FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED
    24   NAMES vorbis vorbis-0
     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 vorbisfile-3
     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/branches/kicklib2/cmake/tools/TargetUtilities.cmake

    r8284 r8285  
    5353 #    This function also installs the target!
    5454 #  Prerequisistes:
    55  #    ORXONOX_DEFAULT_LINK, ORXONOX_CONFIG_FILES, ORXONOX_CONFIG_FILES_GENERATED
     55 #    ORXONOX_DEFAULT_LINK
    5656 #  Parameters:
    5757 #    _target_name, ARGN for the macro arguments
     
    206206        SOURCE_GROUP("Config" FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE})
    207207      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
    211       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})
    214208    ENDIF()
    215209  ENDIF()
     
    291285  IF(_arg_LINK_LIBRARIES)
    292286    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES})
     287  ENDIF()
     288
     289  # RPATH settings for the installation
     290  IF(UNIX)
     291    SET(_rpath ${LIBRARY_INSTALL_DIRECTORY})
     292    IF(_arg_MODULE)
     293      LIST(APPEND _rpath ${MODULE_INSTALL_DIRECTORY})
     294    ENDIF()
     295    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
    293296  ENDIF()
    294297
Note: See TracChangeset for help on using the changeset viewer.