Changeset 2628 for code/branches/buildsystem2/cmake/CheckOGREPlugins.cmake
- Timestamp:
- Feb 1, 2009, 1:18:03 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/cmake/CheckOGREPlugins.cmake
r2626 r2628 49 49 NAMES ${_plugin} 50 50 PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR} 51 PATH_SUFFIXES lib lib/OGRE bin bin/Release bin/release Release release51 PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin 52 52 ) 53 53 FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_DEBUG 54 NAMES ${_plugin}d ${_plugin}_d 54 NAMES ${_plugin}d ${_plugin}_d ${_plugin} 55 55 PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR} 56 PATH_SUFFIXES lib lib/OGRE bin bin/Debug bin/debug Debug debug56 PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin 57 57 ) 58 58 # We only need at least one render system. Check at the end. … … 67 67 IF(OGRE_PLUGIN_${_plugin}_OPTIMIZED) 68 68 # 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) 71 72 ENDIF() 72 73 MARK_AS_ADVANCED(OGRE_PLUGIN_${_plugin}_OPTIMIZED OGRE_PLUGIN_${_plugin}_DEBUG) … … 74 75 ### Set variables to configure orxonox.ini correctly afterwards in bin/ ### 75 76 # 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) 78 79 MESSAGE(FATAL_ERROR "Ogre release plugins have to be in the same folder!") 79 80 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) 83 86 MESSAGE(FATAL_ERROR "Ogre debug plugins have to be in the same folder!") 84 87 ENDIF() 85 SET(OGRE_PLUGINS_FOLDER_DEBUG ${_ debug_folder})88 SET(OGRE_PLUGINS_FOLDER_DEBUG ${_plugins_folder}) 86 89 87 # Create a list with the plugins for rel ase and debug configurations90 # Create a list with the plugins for release and debug configurations 88 91 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") 96 97 ELSE() 97 LIST(APPEND OGRE_PLUGINS_DEBUG ${_plugin})98 LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}") 98 99 ENDIF() 99 100 ENDIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
Note: See TracChangeset
for help on using the changeset viewer.