Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 19, 2011, 6:00:12 AM (13 years ago)
Author:
rgrieder
Message:

Removed build option "OGRE_PLUGINS" since it's not very useful.
Instead created two categories of plugins: mandatory and optional ones, see bottom of LibraryConfig.cmake.

File:
1 edited

Legend:

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

    r7163 r8264  
    2121 #    Reto Grieder
    2222 #  Description:
    23  #    Function that checks each OGRE plugin for existance. Also looks for debug
    24  #    versions and sets them accordingly.
    25  #    All the plugins specified as function arguments have to be found or the
    26  #    script will issue a fatal error. Additionally, all release plugins have
    27  #    to be found in the same folder. Analogously for debug plugins.
     23 #    Finds OGRE plugins and their folder, which has to be unique each set
     24 #    of plugins (Debug, Release).
     25 #    Specify arguments as strings: mandatory and optional plugins.
     26 #    Input:
     27 #      _mandatory_plugins Have to be found, error issued otherwise
     28 #      _optional_plugins  Added as well if found
    2829 #    Output:
    29  #    OGRE_PLUGINS_FOLDER_DEBUG   Folder with the debug plugins
    30  #    OGRE_PLUGINS_FOLDER_RELEASE Folder with the release plugins
    31  #    OGRE_PLUGINS_DEBUG          Names of the debug plugins without extension
    32  #    OGRE_PLUGINS_RELEASE        Names of the release plugins without ext.
     30 #      OGRE_PLUGINS_FOLDER_DEBUG   Folder with the debug plugins
     31 #      OGRE_PLUGINS_FOLDER_RELEASE Folder with the release plugins
     32 #      OGRE_PLUGINS_DEBUG          Names of the debug plugins without extension
     33 #      OGRE_PLUGINS_RELEASE        Names of the release plugins without ext.
    3334 #  Note:
    3435 #    You must not specify render systems as input. That will be taken care of
     
    3637 #
    3738
    38 FUNCTION(CHECK_OGRE_PLUGINS)
    39 
    40   SET(OGRE_PLUGINS ${ARGN})
     39FUNCTION(CHECK_OGRE_PLUGINS _mandatory_plugins _optional_plugins)
    4140
    4241  IF(WIN32)
     
    4948  SET(OGRE_RENDER_SYSTEMS RenderSystem_GL RenderSystem_Direct3D9)
    5049  SET(OGRE_RENDER_SYSTEM_FOUND FALSE)
    51   FOREACH(_plugin ${OGRE_PLUGINS} ${OGRE_RENDER_SYSTEMS})
     50  FOREACH(_plugin ${_mandatory_plugins} ${_optional_plugins} ${OGRE_RENDER_SYSTEMS})
    5251    FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_OPTIMIZED
    5352      NAMES ${_plugin}
     
    6261    # We only need at least one render system. Check at the end.
    6362    IF(NOT ${_plugin} MATCHES "RenderSystem")
    64       IF(NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)
     63      IF(${_plugin} MATCHES "${_mandatory_plugins}" AND NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)
    6564        MESSAGE(FATAL_ERROR "Could not find OGRE plugin named ${_plugin}")
    6665      ENDIF()
Note: See TracChangeset for help on using the changeset viewer.