Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 30, 2009, 12:48:20 PM (16 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.

Location:
code/branches/buildsystem2/cmake
Files:
15 edited

Legend:

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

    r2621 r2624  
    3737IF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)
    3838  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
    39 ENDIF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)
     39ENDIF()
    4040
    4141# Set Debug build to default when not having multi-config generator like msvc
     
    4444    SET(CMAKE_BUILD_TYPE Debug CACHE STRING
    4545        "Build types are: Debug, Release, MinSizeRel, RelWithDebInfo" FORCE)
    46   ENDIF(NOT CMAKE_BUILD_TYPE)
     46  ENDIF()
    4747  MARK_AS_ADVANCED(CLEAR CMAKE_BUILD_TYPE)
    48 ELSE(NOT CMAKE_CONFIGURATION_TYPES)
     48ELSE()
    4949  IF(CMAKE_BUILD_TYPE)
    5050    SET(CMAKE_BUILD_TYPE CACHE STRING FORCE)
    51   ENDIF(CMAKE_BUILD_TYPE)
     51  ENDIF()
    5252  MARK_AS_ADVANCED(CMAKE_BUILD_TYPE)
    53 ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
     53ENDIF()
    5454
    5555OPTION(EXTRA_WARNINGS "Enable some extra warnings (heavily pollutes the output)")
     
    6161IF(NOT EXISTS ${ORXONOX_MEDIA_DIRECTORY})
    6262  MESSAGE(STATUS "Warning: The media directory does not exist ${ORXONOX_MEDIA_DIRECTORY}")
    63 ENDIF(NOT EXISTS ${ORXONOX_MEDIA_DIRECTORY})
     63ENDIF()
    6464
    6565# More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
     
    8888ELSEIF(MSVC)
    8989  INCLUDE(BuildConfigMSVC)
    90 ELSE(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     90ELSE()
    9191  MESSAGE(STATUS "Warning: Your compiler is not officially supported.")
    92 ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)
     92ENDIF()
    9393
    9494SET(BUILD_CONFIG_USER_SCRIPT "" CACHE FILEPATH
     
    102102  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT})
    103103    INCLUDE(${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT})
    104   ENDIF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}.cmake)
     104  ENDIF()
    105105ENDIF(BUILD_CONFIG_USER_SCRIPT)
    106106
  • code/branches/buildsystem2/cmake/BuildConfigGCC.cmake

    r2621 r2624  
    4040IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
    4141  ADD_COMPILER_FLAGS("-fPIC" CACHE)
    42 ENDIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
     42ENDIF()
    4343
    4444# Increase warning level if requested
     
    4646  REMOVE_COMPILER_FLAGS("-Wall" CACHE)
    4747  ADD_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE)
    48 ELSE(EXTRA_WARNINGS)
     48ELSE()
    4949  REMOVE_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE)
    5050  ADD_COMPILER_FLAGS("-Wall" CACHE)
    51 ENDIF(EXTRA_WARNINGS)
     51ENDIF()
    5252
    5353# General linker flags
  • code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake

    r2621 r2624  
    5050  REMOVE_COMPILER_FLAGS("-W1 -W2 -W3" CACHE)
    5151  ADD_COMPILER_FLAGS   ("-W4" CACHE)
    52 ELSE(EXTRA_WARNINGS)
     52ELSE()
    5353  REMOVE_COMPILER_FLAGS("-W1 -W2 -W4" CACHE)
    5454  ADD_COMPILER_FLAGS   ("-W3" CACHE)
    55 ENDIF(EXTRA_WARNINGS)
     55ENDIF()
    5656
    5757# Overwrite CMake default flags here.
  • 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
  • code/branches/buildsystem2/cmake/DetermineVersion.cmake

    r2613 r2624  
    2424    IF(NOT ${_parts_length} EQUAL 3)
    2525      SET(_parts MAJOR MINOR PATCH)
    26     ENDIF(NOT ${_parts_length} EQUAL 3)
     26    ENDIF()
    2727
    2828    FOREACH(_part ${_parts})
     
    3131        SET(${_name}_VERSION_${_part} ${CMAKE_MATCH_1})
    3232        SET(${_name}_VERSION_${_part} ${CMAKE_MATCH_1} PARENT_SCOPE)
    33       ELSE(_match)
     33      ELSE()
    3434        SET(${_name}_VERSION_${_part} "0")
    3535        SET(${_name}_VERSION_${_part} "0" PARENT_SCOPE)
    36       ENDIF(_match)
     36      ENDIF()
    3737      IF("${_parts}" MATCHES "^${_part}") # First?
    3838        SET(${_name}_VERSION "${${_name}_VERSION_${_part}}")
    39       ELSE("${_parts}" MATCHES "^${_part}")
     39      ELSE()
    4040        SET(${_name}_VERSION "${${_name}_VERSION}.${${_name}_VERSION_${_part}}")
    41       ENDIF("${_parts}" MATCHES "^${_part}")
     41      ENDIF()
    4242    ENDFOREACH(_part)
    4343    SET(${_name}_VERSION "${${_name}_VERSION}" PARENT_SCOPE)
  • code/branches/buildsystem2/cmake/FindALUT.cmake

    r2616 r2624  
    4545    # String is in default search path, don't need to use -F
    4646    SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
    47   ELSE("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
    48       OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
    49       )
     47  ELSE()
    5048    # String is not /Library/Frameworks, need to use -F
    5149    SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
    52   ENDIF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
    53     OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
    54     )
     50  ENDIF()
    5551  # Clear the temp variable so nobody can see it
    5652  SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "")
    5753
    58 ELSE(${ALUT_INCLUDE_DIR} MATCHES ".framework")
     54ELSE()
    5955  FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED
    6056    NAMES alut
     
    6763    PATH_SUFFIXES lib libs
    6864  )
    69 ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
     65ENDIF()
    7066
    7167# Handle the REQUIRED argument and set ALUT_FOUND
  • code/branches/buildsystem2/cmake/FindENet.cmake

    r2616 r2624  
    4242  ELSEIF(_enet_header MATCHES "enet_peer_disconnect_later")
    4343    SET(ENET_VERSION 1.1)
    44   ELSE(_enet_header MATCHES "enet_socket_set_option")
     44  ELSE()
    4545    SET(ENET_VERSION 1.0)
    46   ENDIF(_enet_header MATCHES "enet_socket_set_option")
    47 ELSE(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1")
     46  ENDIF()
     47ELSE()
    4848  SET(ENET_VERSION 0) # Script doesn't support versions below 1.0
    49 ENDIF(_enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1")
     49ENDIF()
    5050
    5151# Handle the REQUIRED argument and set ENET_FOUND
     
    6060  # ENet is linked statically, hence we need to add some windows dependencies
    6161  HANDLE_LIBRARY_TYPES(ENET ws2_32 winmm)
    62 ELSE(NOT LINK_ENET_DYNAMIC AND WIN32)
     62ELSE()
    6363  HANDLE_LIBRARY_TYPES(ENET)
    64 ENDIF(NOT LINK_ENET_DYNAMIC AND WIN32)
     64ENDIF()
    6565
    6666MARK_AS_ADVANCED(
  • code/branches/buildsystem2/cmake/FindLua.cmake

    r2615 r2624  
    77  IF(EXISTS ${_file})
    88    FILE(STRINGS ${_file} _file_content REGEX "LUA_VERSION|LUA_RELEASE")
    9   ELSE(EXISTS ${_file})
     9  ELSE()
    1010    SET(${_varname} "0" PARENT_SCOPE)
    1111    RETURN()
    12   ENDIF(EXISTS ${_file})
     12  ENDIF()
    1313  STRING(REGEX REPLACE "^.*LUA_RELEASE[ \t]+\"Lua[ \t]+([.0-9]+)\".*$" "\\1" ${_varname} "${_file_content}")
    1414  IF(${_varname} STREQUAL "${_file_content}")
     
    1717    IF(${_varname} STREQUAL "${_file_content}")
    1818      MESSAGE(FATAL_ERROR "Could not determine Lua version which means this script has a bug")
    19     ENDIF(${_varname} STREQUAL "${_file_content}")
     19    ENDIF()
    2020    IF(${_varname} MATCHES "^[0-9]+\\.[0-9]+$")
    2121      SET(${_varname} "${${_varname}}.0") # E.g. "3.2" is "3.2.0" actually
    22     ENDIF(${_varname} MATCHES "^[0-9]+\\.[0-9]+$")
    23   ENDIF(${_varname} STREQUAL "${_file_content}")
     22    ENDIF()
     23  ENDIF()
    2424  SET(${_varname} "${${_varname}}" PARENT_SCOPE)
    2525ENDFUNCTION(DETERMINE_LUA_VERSION)
     
    3737    # Incorrect version found, abort search
    3838    SET(LUA_5.1_INCLUDE_DIR "LUA_5.1_INCLUDE_DIR-NOTFOUND" CACHE PATH "" FORCE)
    39   ELSE(NOT _version_compare EQUAL 0)
     39  ELSE()
    4040    FIND_LIBRARY(LUA_5.1_LIBRARY_OPTIMIZED
    4141      NAMES lua51 lua5.1 lua
     
    5252    IF(LUA_5.1_LIBRARIES)
    5353      SET(LUA_5.1_FOUND TRUE)
    54     ENDIF(LUA_5.1_LIBRARIES)
     54    ENDIF()
    5555  ENDIF(NOT _version_compare EQUAL 0)
    5656ENDIF(LUA_5.1_INCLUDE_DIR)
     
    6868    # Incorrect version found, abourt search
    6969    SET(LUA_5.0_INCLUDE_DIR "LUA_5.0_INCLUDE_DIR-NOTFOUND" CACHE PATH "" FORCE)
    70   ELSE(NOT _version_compare EQUAL 0)
     70  ELSE()
    7171    FIND_LIBRARY(LUA_5.0_LUA_LIBRARY_OPTIMIZED
    7272      NAMES lua50 lua5.0 lua5 lua
     
    8585    IF(${LUA_5.0_LUA_LIBRARY} MATCHES "framework")
    8686      SET(LUA_5.0_LIBRARIES ${LUA_5.0_LUA_LIBRARY})
    87     ELSE(${LUA_5.0_LUA_LIBRARY} MATCHES "framework")
     87    ELSE()
    8888      FIND_LIBRARY(LUA_5.0_LUALIB_LIBRARY_OPTIMIZED
    8989        NAMES lualib50 lualib5.0 lualib5 lualib
     
    101101      IF(LUA_5.0_LUA_LIBRARY AND LUA_5.0_LUALIB_LIBRARY)
    102102        SET(LUA_5.0_LIBRARIES ${LUA_5.0_LUA_LIBRARY} ${LUA_5.0_LUALIB_LIBRARY})
    103       ENDIF(LUA_5.0_LUA_LIBRARY AND LUA_5.0_LUALIB_LIBRARY)
     103      ENDIF()
    104104    ENDIF(${LUA_5.0_LUA_LIBRARY} MATCHES "framework")
    105105   
    106106    IF(LUA_5.0_LIBRARIES)
    107107      SET(LUA_5.0_FOUND TRUE)
    108     ENDIF(LUA_5.0_LIBRARIES)
     108    ENDIF()
    109109  ENDIF(NOT _version_compare EQUAL 0)
    110110ENDIF(LUA_5.0_INCLUDE_DIR)
     
    113113IF(Lua_FIND_VERSION_EXACT AND NOT Lua_FIND_VERSION MATCHES "^[0-9]*$")
    114114  STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+)(\\..*)?$" "\\1" LUA_VERSION_SELECTION ${Lua_FIND_VERSION})
    115 ELSE(Lua_FIND_VERSION_EXACT AND NOT Lua_FIND_VERSION MATCHES "^[0-9]*$")
     115ELSE()
    116116  IF(LUA_5.1_FOUND) # Prefer version 5.1 if found
    117117    SET(LUA_VERSION_SELECTION "5.1")
    118118  ELSEIF(LUA_5.0_FOUND)
    119119    SET(LUA_VERSION_SELECTION "5.0")
    120   ENDIF(LUA_5.1_FOUND)
    121 ENDIF(Lua_FIND_VERSION_EXACT AND NOT Lua_FIND_VERSION MATCHES "^[0-9]*$")
     120  ENDIF()
     121ENDIF()
    122122
    123123SET(LUA_INCLUDE_DIR "${LUA_${LUA_VERSION_SELECTION}_INCLUDE_DIR}")
     
    136136    FIND_LIBRARY(UNIX_MATH_LIBRARY m)
    137137    SET(LUA_LIBRARIES ${LUA_LIBRARIES} ${UNIX_MATH_LIBRARY})
    138   ENDIF(UNIX AND NOT APPLE)
     138  ENDIF()
    139139ENDIF(LUA_FOUND)
    140140
  • code/branches/buildsystem2/cmake/FindPackageHandleAdvancedArgs.cmake

    r2613 r2624  
    77  IF("${_fail_msg}" STREQUAL "DEFAULT_MSG")
    88    SET(_fail_msg_adv "Could NOT find ${_name}")
    9   ELSE("${_fail_msg}" STREQUAL "DEFAULT_MSG")
     9  ELSE()
    1010    SET(_fail_msg_adv "${_fail_msg}")
    11   ENDIF("${_fail_msg}" STREQUAL "DEFAULT_MSG")
     11  ENDIF()
    1212  IF(${_name}_FIND_VERSION_EXACT)
    1313    SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: exactly ${${_name}_FIND_VERSION}")
    14   ELSE(${_name}_FIND_VERSION_EXACT)
     14  ELSE()
    1515    SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: at least ${${_name}_FIND_VERSION}")
    16   ENDIF(${_name}_FIND_VERSION_EXACT)
     16  ENDIF()
    1717  FIND_PACKAGE_HANDLE_STANDARD_ARGS("${_name}" "${_fail_msg_adv}" ${ARGN})
    1818  STRING(TOUPPER ${_name} _NAME_UPPER)
     
    3131                          "Your version is ${_version}")
    3232      SET(${_NAME_UPPER}_FOUND FALSE)
    33     ENDIF(${_name}_FIND_VERSION_EXACT AND NOT _compatible EQUAL 0)
     33    ENDIF()
    3434  ENDIF(${_name}_FIND_VERSION)
    3535
  • code/branches/buildsystem2/cmake/FlagUtilities.cmake

    r2620 r2624  
    2323  IF(NOT "${_type}" MATCHES "^(STRING|BOOL|PATH|FILEPATH)$")
    2424    MESSAGE(FATAL_ERROR "${_type} is not a valid CACHE entry type")
    25   ENDIF(NOT "${_type}" MATCHES "^(STRING|BOOL|PATH|FILEPATH)$")
     25  ENDIF()
    2626
    2727  IF(NOT DEFINED _INTERNAL_${_varname} OR "${_INTERNAL_${_varname}}" STREQUAL "${${_varname}}")
    2828    SET(${_varname} "${_value}" CACHE ${_type} "${_docstring}" FORCE)
    29   ENDIF(NOT DEFINED _INTERNAL_${_varname} OR "${_INTERNAL_${_varname}}" STREQUAL "${${_varname}}")
     29  ENDIF()
    3030  SET(_INTERNAL_${_varname} "${_value}" CACHE INTERNAL "Do not edit in any case!")
    3131ENDMACRO(SET_CACHE)
     
    6969    # SET
    7070    SET(_flag_list "${_arg_flag_list}")
    71   ELSE("${_mode}" STREQUAL "SET")
     71  ELSE()
    7272    # ADD or REMOVE
    7373    SEPARATE_FLAGS("${${_varname}}" _flag_list)
     
    7575      LIST(${_mode} _flag_list "${_flag}")
    7676    ENDFOREACH(_flag)
    77   ENDIF("${_mode}" STREQUAL "SET")
     77  ENDIF()
    7878
    7979  LIST(REMOVE_DUPLICATES _flag_list)
     
    8585      SET(${_varname} "${_flag_list}" CACHE STRING "${${_varname}}" FORCE)
    8686      SET(${_varname} "${_flag_list}" CACHE STRING "${${_varname}}" FORCE)
    87     ELSE(_force)
     87    ELSE()
    8888      SET_CACHE(${_varname} STRING "${${_varname}}" "${_flag_list}")
    89     ENDIF(_force)
    90   ELSE(_write_to_cache)
     89    ENDIF()
     90  ELSE()
    9191    SET(${_varname} "${_flag_list}")
    92   ENDIF(_write_to_cache)
     92  ENDIF()
    9393ENDMACRO(_INTERNAL_PARSE_FLAGS)
    9494
     
    121121    ELSEIF(_arg MATCHES "^[Nn][Oo][Tt]$")
    122122      SET(_invert_condition TRUE)
    123     ELSE(_arg MATCHES "${_key_regex}")
     123    ELSE()
    124124      IF(_invert_condition)
    125125        SET(_invert_condition FALSE)
    126126        IF(${_arg})
    127127          SET(_arg_cond FALSE)
    128         ELSE(${_arg})
     128        ELSE()
    129129          SET(_arg_cond TRUE)
    130         ENDIF(${_arg})
    131       ELSE(_invert_condition)
     130        ENDIF()
     131      ELSE()
    132132        SET(_arg_cond ${${_arg}})
    133       ENDIF(_invert_condition)
     133      ENDIF()
    134134      IF(_cond AND _arg_cond)
    135135        SET(_cond TRUE)
    136       ELSE(_cond AND _arg_cond)
     136      ELSE()
    137137        SET(_cond FALSE)
    138       ENDIF(_cond AND _arg_cond)
    139     ENDIF(_arg MATCHES "${_key_regex}")
     138      ENDIF()
     139    ENDIF()
    140140  ENDFOREACH(_arg)
    141141
     
    143143  IF(NOT DEFINED _langs)
    144144    SET(_langs ${_keys})
    145   ENDIF(NOT DEFINED _langs)
     145  ENDIF()
    146146
    147147  IF(_cond)
     
    152152          _INTERNAL_PARSE_FLAGS(${_mode} "${_flags}" ${_varname}_${_build_type} ${_write_to_cache} ${_force})
    153153        ENDFOREACH(_build_type)
    154       ELSE(DEFINED _build_types)
     154      ELSE()
    155155        _INTERNAL_PARSE_FLAGS(${_mode} "${_flags}" ${_varname} ${_write_to_cache} ${_force})
    156       ENDIF(DEFINED _build_types)
     156      ENDIF()
    157157    ENDFOREACH(_lang ${_langs})
    158158  ENDIF(_cond)
  • code/branches/buildsystem2/cmake/HandleLibraryTypes.cmake

    r2613 r2624  
    3434      PARENT_SCOPE
    3535    )
    36   ELSE(${_name}_LIBRARY_DEBUG AND ${_name}_LIBRARY_OPTIMIZED)
     36  ELSE()
    3737    SET(${_name}_LIBRARY
    3838      ${${_name}_LIBRARY_OPTIMIZED} ${ARGN}
    3939      PARENT_SCOPE
    4040     )
    41   ENDIF(${_name}_LIBRARY_DEBUG AND ${_name}_LIBRARY_OPTIMIZED)
     41  ENDIF()
    4242ENDFUNCTION(HANDLE_LIBRARY_TYPES)
  • code/branches/buildsystem2/cmake/LibraryConfig.cmake

    r2618 r2624  
    2727  ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
    2828    INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
    29   ENDIF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT}.cmake)
     29  ENDIF()
    3030ENDIF(LIBRARY_CONFIG_USER_SCRIPT)
    3131
     
    6666  IF(version_comparison LESS 0)
    6767    SET(LUA_VERSION_REQUEST 5.0)
    68   ELSE(version_comparison LESS 0)
     68  ELSE()
    6969    SET(LUA_VERSION_REQUEST 5.1)
    70   ENDIF(version_comparison LESS 0)
    71 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY)
     70  ENDIF()
     71ELSE()
    7272  SET(LUA_VERSION_REQUEST 5)
    73 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY)
     73ENDIF()
    7474FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED)
    7575
     
    8181IF(DEFINED OPENAL_FOUND_FIRST_TIME)
    8282  SET(OPENAL_FOUND_FIRST_TIME FALSE CACHE INTERNAL "")
    83 ELSE(DEFINED OPENAL_FOUND_FIRST_TIME)
     83ELSE()
    8484  SET(OPENAL_FOUND_FIRST_TIME TRUE CACHE INTERNAL "")
    8585  STRING(REGEX REPLACE "^(.*)/AL$" "\\1" _openal_dir_2 ${OPENAL_INCLUDE_DIR})
    8686  IF(_openal_dir_2)
    8787    SET(OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} ${_openal_dir_2} CACHE STRING "" FORCE)
    88   ENDIF(_openal_dir_2)
    89 ENDIF(DEFINED OPENAL_FOUND_FIRST_TIME)
     88  ENDIF()
     89ENDIF()
    9090# Hide variables created by the script
    9191MARK_AS_ADVANCED(
  • code/branches/buildsystem2/cmake/LibraryConfigMSVC.cmake

    r2623 r2624  
    2929# Set the library directories when using Visual Studio.   #
    3030
    31 IF (MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
     31IF(MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
    3232  MESSAGE(STATUS "Running on MSVC. Using customized paths and options.")
    3333
     
    3737  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8)
    3838    SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8")
    39   ELSE(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
     39  ELSE()
    4040    MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries")
    41   ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
     41  ENDIF()
    4242  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MSVC_LIBRARY_DIR}/bin)
    4343
     
    6060  SET(ZLIB_LIBRARY optimized ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib
    6161                   debug     ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib)
    62   IF ($ENV{DXSDK_DIR} STREQUAL "")
     62  IF($ENV{DXSDK_DIR} STREQUAL "")
    6363    SET(ENV{DXSDK_DIR}       ${MSVC_LIBRARY_DIR}/directx-sdk-aug-2007)
    64   ENDIF ($ENV{DXSDK_DIR} STREQUAL "")
     64  ENDIF()
    6565
    66 ENDIF (MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
     66ENDIF(MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
  • code/branches/buildsystem2/cmake/LibraryConfigMinGW.cmake

    r2621 r2624  
    3131###################################################
    3232
    33 IF (MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
     33IF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
    3434  MESSAGE(STATUS "Running on MinGW. Using customized paths and options.")
    3535
     
    3939  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lis)
    4040    SET(MINGW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../libs")
    41   ELSE(EXISTS ${CMAKE_SOURCE_DIR}/libs)
     41  ELSE()
    4242    MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries")
    43   ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/libs)
     43  ENDIF()
    4444  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MINGW_LIBRARY_DIR})
    4545
     
    6464  SET(ZLIB_LIBRARY          "${MINGW_LIBRARY_DIR}/zlib/libzlib.a")
    6565  SET(LINK_ZLIB_DYNAMIC    FALSE)
    66   IF ($ENV{DXSDK_DIR} STREQUAL "")
     66  IF($ENV{DXSDK_DIR} STREQUAL "")
    6767    SET(ENV{DXSDK_DIR}      "${MINGW_LIBRARY_DIR}/DXSDK")
    68   ENDIF ($ENV{DXSDK_DIR} STREQUAL "")
    69 ENDIF (MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
     68  ENDIF()
     69ENDIF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
  • code/branches/buildsystem2/cmake/LibraryConfigTardis.cmake

    r2618 r2624  
    44#################################################
    55
    6 IF (UNIX)
     6IF(UNIX)
    77  FILE(STRINGS /etc/hostname HOSTNAME LIMIT_COUNT 1)
    8   IF (${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$")
     8  IF(${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$")
    99    SET (TARDIS ON)
    10   ENDIF (${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$")
    11 ENDIF (UNIX)
     10  ENDIF()
     11ENDIF(UNIX)
    1212
    13 IF (TARDIS)
     13IF(TARDIS)
    1414  MESSAGE(STATUS "Running on D-ITET isg.ee Tardis Computer. Using customized paths.")
    1515
     
    3131  SET(ENV{OPENALDIR}   "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
    3232  #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
    33 ENDIF (TARDIS)
     33ENDIF(TARDIS)
Note: See TracChangeset for help on using the changeset viewer.