Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2628 for code


Ignore:
Timestamp:
Feb 1, 2009, 1:18:03 AM (16 years ago)
Author:
rgrieder
Message:

Small fixes:

  • CheckOGREPlugins wasn't handling debug libraries correctly
  • OpenAL was missig the "Found OpenAL" message
  • changed all find scripts to show the library in the output instead of the include directory
  • Run script gets overridden by force
  • Also copy run script to the bin folder
Location:
code/branches/buildsystem2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/bin-config/CMakeLists.txt

    r2626 r2628  
    104104    SET(RUN_SCRIPT run)
    105105  ENDIF(WIN32)
    106   IF(NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
    107     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT} ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT} @ONLY)
    108   ENDIF()
     106  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT} ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT} @ONLY)
     107  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${RUN_SCRIPT} @ONLY)
    109108ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
  • code/branches/buildsystem2/cmake/CheckOGREPlugins.cmake

    r2626 r2628  
    4949      NAMES ${_plugin}
    5050      PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR}
    51       PATH_SUFFIXES lib lib/OGRE bin bin/Release bin/release Release release
     51      PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin
    5252    )
    5353    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_DEBUG
    54       NAMES ${_plugin}d ${_plugin}_d
     54      NAMES ${_plugin}d ${_plugin}_d ${_plugin}
    5555      PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR}
    56       PATH_SUFFIXES lib lib/OGRE bin bin/Debug bin/debug Debug debug
     56      PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin
    5757    )
    5858    # We only need at least one render system. Check at the end.
     
    6767    IF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
    6868      # If debug version is not available, release will do as well
    69       IF(NOT OGRE_PLUGIN_${_plugin}_DEBUG)
    70         SET(OGRE_PLUGIN_${_plugin}_DEBUG ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} CACHE STRING "" FORCE)
     69      IF(OGRE_PLUGIN_${_plugin}_DEBUG STREQUAL OGRE_PLUGIN_${_plugin}_OPTIMIZED)
     70        # In this case the library finder didn't find real debug versions
     71        SET(OGRE_PLUGIN_${_plugin}_DEBUG "OGRE_PLUGIN_${_plugin}_DEBUG-NOTFOUND" CACHE STRING "" FORCE)
    7172      ENDIF()
    7273      MARK_AS_ADVANCED(OGRE_PLUGIN_${_plugin}_OPTIMIZED OGRE_PLUGIN_${_plugin}_DEBUG)
     
    7475      ### Set variables to configure orxonox.ini correctly afterwards in bin/ ###
    7576      # Check and set the folders
    76       GET_FILENAME_COMPONENT(_release_folder ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} PATH)
    77       IF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _release_folder)
     77      GET_FILENAME_COMPONENT(_plugins_folder ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} PATH)
     78      IF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _plugins_folder)
    7879        MESSAGE(FATAL_ERROR "Ogre release plugins have to be in the same folder!")
    7980      ENDIF()
    80       SET(OGRE_PLUGINS_FOLDER_RELEASE ${_release_folder})
    81       GET_FILENAME_COMPONENT(_debug_folder ${OGRE_PLUGIN_${_plugin}_DEBUG} PATH)
    82       IF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _debug_folder)
     81      SET(OGRE_PLUGINS_FOLDER_RELEASE ${_plugins_folder})
     82      IF(OGRE_PLUGIN_${_plugin}_DEBUG)
     83        GET_FILENAME_COMPONENT(_plugins_folder ${OGRE_PLUGIN_${_plugin}_DEBUG} PATH)
     84      ENDIF()
     85      IF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _plugins_folder)
    8386        MESSAGE(FATAL_ERROR "Ogre debug plugins have to be in the same folder!")
    8487      ENDIF()
    85       SET(OGRE_PLUGINS_FOLDER_DEBUG ${_debug_folder})
     88      SET(OGRE_PLUGINS_FOLDER_DEBUG ${_plugins_folder})
    8689
    87       # Create a list with the plugins for relase and debug configurations
     90      # Create a list with the plugins for release and debug configurations
    8891      LIST(APPEND OGRE_PLUGINS_RELEASE ${_plugin})
    89       IF(OGRE_PLUGIN_${_plugin}_DEBUG)
    90         # Determine debug postfix ("d" or "_d")
    91         IF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")
    92           LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}_d")
    93         ELSE()
    94           LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}d")
    95         ENDIF()
     92      # Determine debug postfix ("d" or "_d" or none)
     93      IF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")
     94        LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}_d")
     95      ELSEIF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "d\\.|d$")
     96        LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}d")
    9697      ELSE()
    97         LIST(APPEND OGRE_PLUGINS_DEBUG ${_plugin})
     98        LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}")
    9899      ENDIF()
    99100    ENDIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
  • code/branches/buildsystem2/cmake/FindALUT.cmake

    r2626 r2628  
    6767# Handle the REQUIRED argument and set ALUT_FOUND
    6868FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG
     69    ALUT_LIBRARY_OPTIMIZED
    6970    ALUT_INCLUDE_DIR
    70     ALUT_LIBRARY_OPTIMIZED
    7171)
    7272
  • code/branches/buildsystem2/cmake/FindCEGUI.cmake

    r2626 r2628  
    5454# Also checks the version requirements if given
    5555FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}"
     56  CEGUI_LIBRARY_OPTIMIZED
    5657  CEGUI_INCLUDE_DIR
    57   CEGUI_LIBRARY_OPTIMIZED
    5858)
    5959
  • code/branches/buildsystem2/cmake/FindDirectX.cmake

    r2626 r2628  
    4040# Handle the REQUIRED argument and set DIRECTX_FOUND
    4141FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectX DEFAULT_MSG
    42   DIRECTX_INCLUDE_DIR
    4342  DIRECTX_LIBRARY_input
    4443  DIRECTX_LIBRARY_guid
     44  DIRECTX_INCLUDE_DIR
    4545)
    4646
  • code/branches/buildsystem2/cmake/FindENet.cmake

    r2626 r2628  
    5353# Also check the the version requirements
    5454FIND_PACKAGE_HANDLE_ADVANCED_ARGS(ENet DEFAULT_MSG ${ENET_VERSION}
     55  ENET_LIBRARY_OPTIMIZED
    5556  ENET_INCLUDE_DIR
    56   ENET_LIBRARY_OPTIMIZED
    5757)
    5858
  • code/branches/buildsystem2/cmake/FindLua.cmake

    r2626 r2628  
    156156
    157157FIND_PACKAGE_HANDLE_ADVANCED_ARGS(Lua DEFAULT_MSG "${LUA_VERSION_LONG}"
     158  LUA_LIBRARIES
    158159  LUA_INCLUDE_DIR
    159   LUA_LIBRARIES
    160160)
    161161
  • code/branches/buildsystem2/cmake/FindOGRE.cmake

    r2626 r2628  
    4242# Also check the version requirements
    4343FIND_PACKAGE_HANDLE_ADVANCED_ARGS(OGRE DEFAULT_MSG ${OGRE_VERSION}
     44  OGRE_LIBRARY_OPTIMIZED
    4445  OGRE_INCLUDE_DIR
    45   OGRE_LIBRARY_OPTIMIZED
    4646)
    4747
  • code/branches/buildsystem2/cmake/FindOgg.cmake

    r2626 r2628  
    3838# Handle the REQUIRED argument and set OGG_FOUND
    3939FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG
     40  OGG_LIBRARY_OPTIMIZED
    4041  OGG_INCLUDE_DIR
    41   OGG_LIBRARY_OPTIMIZED
    4242)
    4343
  • code/branches/buildsystem2/cmake/LibraryConfig.cmake

    r2626 r2628  
    115115  ENDIF()
    116116ENDIF()
     117# Notfiy user
     118FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
    117119# Hide variables created by the script
    118 MARK_AS_ADVANCED(
    119   OPENAL_INCLUDE_DIR
    120   OPENAL_LIBRARY
    121 )
     120MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)
    122121
    123122##### TCL #####
     
    129128SET(TCL_FIND_QUIETLY FALSE)
    130129FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
    131 # Workaround a CMake bug that doesn't set the variables to the cache
    132 # Occurs at least on CMake 2.6.2 and 2.6.0 under Windows
    133 SET(TCL_LIBRARY ${TCL_LIBRARY} CACHE FILEPATH "")
    134 SET(TCL_INCLUDE_PATH ${TCL_INCLUDE_PATH} CACHE PATH "")
    135130
    136131##### Boost #####
Note: See TracChangeset for help on using the changeset viewer.