Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 1, 2009, 1:18:03 AM (15 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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.