Changeset 8264 for code/trunk/cmake/tools
- Timestamp:
- Apr 19, 2011, 6:00:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/cmake/tools/CheckOGREPlugins.cmake
r7163 r8264 21 21 # Reto Grieder 22 22 # 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 28 29 # Output: 29 # OGRE_PLUGINS_FOLDER_DEBUG Folder with the debug plugins30 # OGRE_PLUGINS_FOLDER_RELEASE Folder with the release plugins31 # OGRE_PLUGINS_DEBUG Names of the debug plugins without extension32 # 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. 33 34 # Note: 34 35 # You must not specify render systems as input. That will be taken care of … … 36 37 # 37 38 38 FUNCTION(CHECK_OGRE_PLUGINS) 39 40 SET(OGRE_PLUGINS ${ARGN}) 39 FUNCTION(CHECK_OGRE_PLUGINS _mandatory_plugins _optional_plugins) 41 40 42 41 IF(WIN32) … … 49 48 SET(OGRE_RENDER_SYSTEMS RenderSystem_GL RenderSystem_Direct3D9) 50 49 SET(OGRE_RENDER_SYSTEM_FOUND FALSE) 51 FOREACH(_plugin ${ OGRE_PLUGINS} ${OGRE_RENDER_SYSTEMS})50 FOREACH(_plugin ${_mandatory_plugins} ${_optional_plugins} ${OGRE_RENDER_SYSTEMS}) 52 51 FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_OPTIMIZED 53 52 NAMES ${_plugin} … … 62 61 # We only need at least one render system. Check at the end. 63 62 IF(NOT ${_plugin} MATCHES "RenderSystem") 64 IF( NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)63 IF(${_plugin} MATCHES "${_mandatory_plugins}" AND NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED) 65 64 MESSAGE(FATAL_ERROR "Could not find OGRE plugin named ${_plugin}") 66 65 ENDIF()
Note: See TracChangeset
for help on using the changeset viewer.