Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 30, 2009, 12:48:20 PM (15 years ago)
Author:
rgrieder
Message:

Replaced most of the ELSE(…) and ENDIF(…) with ELSE() and ENDIF(). Kept the shorter and the spreaded ones for better clarity since that's what it originally was thought for. But I can really pollute the code when having long conditions and lots of IFs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/CheckOGREPlugins.cmake

    r2618 r2624  
    4646      IF(NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)
    4747        MESSAGE(FATAL_ERROR "Could not find OGRE plugin named ${_plugin}")
    48       ENDIF(NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)
     48      ENDIF()
    4949    ELSEIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
    5050      SET(OGRE_RENDER_SYSTEM_FOUND TRUE)
    51     ENDIF(NOT ${_plugin} MATCHES "RenderSystem")
     51    ENDIF()
    5252
    5353    IF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
     
    5555      IF(NOT OGRE_PLUGIN_${_plugin}_DEBUG)
    5656        SET(OGRE_PLUGIN_${_plugin}_DEBUG ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} CACHE STRING "" FORCE)
    57       ENDIF(NOT OGRE_PLUGIN_${_plugin}_DEBUG)
     57      ENDIF()
    5858      MARK_AS_ADVANCED(OGRE_PLUGIN_${_plugin}_OPTIMIZED OGRE_PLUGIN_${_plugin}_DEBUG)
    5959
     
    6363      IF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _release_folder)
    6464        MESSAGE(FATAL_ERROR "Ogre release plugins have to be in the same folder!")
    65       ENDIF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _release_folder)
     65      ENDIF()
    6666      SET(OGRE_PLUGINS_FOLDER_RELEASE ${_release_folder})
    6767      GET_FILENAME_COMPONENT(_debug_folder ${OGRE_PLUGIN_${_plugin}_DEBUG} PATH)
    6868      IF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _debug_folder)
    6969        MESSAGE(FATAL_ERROR "Ogre debug plugins have to be in the same folder!")
    70       ENDIF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _debug_folder)
     70      ENDIF()
    7171      SET(OGRE_PLUGINS_FOLDER_DEBUG ${_debug_folder})
    7272
     
    7777        IF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")
    7878          LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}_d")
    79         ELSE(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")
     79        ELSE()
    8080          LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}d")
    81         ENDIF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")
    82       ELSE(OGRE_PLUGIN_${_plugin}_DEBUG)
     81        ENDIF()
     82      ELSE()
    8383        LIST(APPEND OGRE_PLUGINS_DEBUG ${_plugin})
    84       ENDIF(OGRE_PLUGIN_${_plugin}_DEBUG)
     84      ENDIF()
    8585    ENDIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED)
    8686  ENDFOREACH(_plugin)
    8787  IF(NOT OGRE_RENDER_SYSTEM_FOUND)
    8888      MESSAGE(FATAL_ERROR "Could not find an OGRE render system plugin")
    89   ENDIF(NOT OGRE_RENDER_SYSTEM_FOUND)
     89  ENDIF()
    9090
    9191  # List has to be comma separated for orxonox.ini
Note: See TracChangeset for help on using the changeset viewer.