Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8264


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.

Location:
code/trunk/cmake
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/LibraryConfig.cmake

    r7955 r8264  
    202202################# OGRE Plugins ##################
    203203
    204 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
    205 SET(OGRE_PLUGINS_INT Plugin_ParticleFX)
    206 IF(WIN32)
    207   # CG program manager is probably DirectX related (not available under unix)
    208   LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)
    209 ENDIF(WIN32)
    210 SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING
    211    "Specify which OGRE plugins to load. Existance check is performed.")
    212 
    213204# Check the plugins and determine the plugin folder
    214205# You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}
    215206INCLUDE(CheckOGREPlugins)
    216 CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})
    217 
     207# Note 1: First argument (as string!) are for mandatory plugins, second one is
     208#         for optional ones.
     209# Note 2: Render systems are found automatically (at least one required)
     210CHECK_OGRE_PLUGINS("Plugin_ParticleFX" "Plugin_CgProgramManager")
     211
  • 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.