Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2624


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
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/CMakeLists.txt

    r2612 r2624  
    1111IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
    1212  MESSAGE(FATAL_ERROR "Do not use the root directory as CMake output directory! mkdir build; cd build; cmake ..")
    13 ENDIF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
     13ENDIF()
    1414
    1515# This sets where to look for modules (e.g. "Find*.cmake" files)
  • code/branches/buildsystem2/bin-config/CMakeLists.txt

    r2621 r2624  
    2525    IF(${_build_config} MATCHES "Rel")
    2626      SET(_build_config_short "Release")
    27     ELSE(${_build_config} MATCHES "Rel")
     27    ELSE()
    2828      SET(_build_config_short "Debug")
    29     ENDIF(${_build_config} MATCHES "Rel")
     29    ENDIF()
    3030    IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
    3131      SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
    32     ELSE(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
     32    ELSE()
    3333      SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file_name})
    34     ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
     34    ENDIF()
    3535
    3636    # Copy to the folder named like the build config for Visual Studio
    3737    IF(CMAKE_CONFIGURATION_TYPES)
    3838      SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_build_config}/${_file_name})
    39     ELSE(CMAKE_CONFIGURATION_TYPES)
     39    ELSE()
    4040      SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_file_name})
    41     ENDIF(CMAKE_CONFIGURATION_TYPES)
     41    ENDIF()
    4242    # Only copy if target file doesn't exist. This may result in problems but
    4343    # otherwise we might delete a user's config
    44     IF (NOT EXISTS ${_out_file} OR _read_only)
     44    IF(NOT EXISTS ${_out_file} OR _read_only)
    4545      CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
    46     ENDIF (NOT EXISTS ${_out_file} OR _read_only)
     46    ENDIF()
    4747  ENDFOREACH(_build_config)
    4848ENDMACRO(CONFIGURE_FILES)
     
    5151IF(CMAKE_CONFIGURATION_TYPES)
    5252  SET(BUILD_CONFIGS ${CMAKE_CONFIGURATION_TYPES})
    53 ELSE(CMAKE_CONFIGURATION_TYPES)
     53ELSE()
    5454  SET(CONFIG_OUT_PATHS_REL ".")
    5555  SET(BUILD_CONFIGS ${CMAKE_BUILD_TYPE})
    56 ENDIF(CMAKE_CONFIGURATION_TYPES)
     56ENDIF()
    5757
    5858FOREACH(_file_name ${READ_ONLY_CONFIG_FILES})
     
    7777    SET(RUN_SCRIPT run)
    7878  ENDIF(WIN32)
    79   IF (NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
     79  IF(NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
    8080    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT} ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT} @ONLY)
    81   ENDIF (NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT})
     81  ENDIF()
    8282ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
  • 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)
  • code/branches/buildsystem2/src/CMakeLists.txt

    r2621 r2624  
    5454  IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
    5555    MESSAGE(FATAL_ERROR "CEGUILua version not found in src folder. Update list of supported versions in LibraryConfig.cmake!")
    56   ENDIF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION})
     56  ENDIF()
    5757
    5858  INCLUDE_DIRECTORIES(ceguilua/ceguilua-${CEGUI_VERSION})
    5959  ADD_SUBDIRECTORY(ceguilua)
    60 ENDIF(CEGUILUA_USE_INTERNAL_LIBRARY)
     60ENDIF()
    6161
    6262ADD_SUBDIRECTORY(cpptcl)
  • code/branches/buildsystem2/src/ceguilua/CMakeLists.txt

    r2623 r2624  
    2121  IF(_compare_result EQUAL 1)
    2222    BREAK() # _version > CEGUI_VERSION
    23   ENDIF(_compare_result EQUAL 1)
     23  ENDIF()
    2424  ADD_SUBDIRECTORY(ceguilua-${_version})
    2525ENDFOREACH(_version)
     
    5353)
    5454
    55 IF (NOT WIN32)
     55IF(NOT WIN32)
    5656  INSTALL(TARGETS ceguilua_orxonox LIBRARY DESTINATION lib)
    57 ENDIF (NOT WIN32)
     57ENDIF()
  • code/branches/buildsystem2/src/core/CMakeLists.txt

    r2621 r2624  
    6464)
    6565
    66 IF (NOT WIN32)
     66IF(NOT WIN32)
    6767  INSTALL(TARGETS core LIBRARY DESTINATION lib)
    68 ENDIF (NOT WIN32)
     68ENDIF()
  • code/branches/buildsystem2/src/cpptcl/CMakeLists.txt

    r2622 r2624  
    1616IF(MSVC)
    1717  ADD_LIBRARY(cpptcl_orxonox STATIC ${CPPTCL_FILES})
    18 ELSE(MSVC)
     18ELSE()
    1919  ADD_LIBRARY(cpptcl_orxonox SHARED ${CPPTCL_FILES})
    20 ENDIF(MSVC)
     20ENDIF()
    2121
    2222TARGET_LINK_LIBRARIES(cpptcl_orxonox
     
    2424)
    2525
    26 IF (NOT WIN32)
     26IF(NOT WIN32)
    2727  INSTALL(TARGETS cpptcl_orxonox LIBRARY DESTINATION lib)
    28 ENDIF (NOT WIN32)
     28ENDIF()
  • code/branches/buildsystem2/src/network/CMakeLists.txt

    r2621 r2624  
    2222IF(MINGW)
    2323  ADD_LIBRARY(network ${NETWORK_FILES})
    24 ELSE(MINGW)
     24ELSE()
    2525  ADD_LIBRARY(network SHARED ${NETWORK_FILES})
    26 ENDIF(MINGW)
     26ENDIF()
    2727
    2828SET_TARGET_PROPERTIES(network PROPERTIES DEFINE_SYMBOL "NETWORK_SHARED_BUILD")
     
    3535)
    3636
    37 IF (NOT WIN32)
     37IF(NOT WIN32)
    3838  INSTALL(TARGETS network LIBRARY DESTINATION lib)
    39 ENDIF (NOT WIN32)
     39ENDIF()
    4040
    4141# build those parts only on request.
    4242IF(NETWORK_TESTING_ENABLED)
    4343  ##### test for gamestate stuff #####
    44   SET( TEST_SRC_FILES
     44  SET(TEST_SRC_FILES
    4545    ${NETWORK_SRC_FILES}
    4646  )
    4747  ADD_EXECUTABLE(networktest ${TEST_SRC_FILES})
    48   TARGET_LINK_LIBRARIES( networktest
     48  TARGET_LINK_LIBRARIES(networktest
    4949    ${OGRE_LIBRARY}
    5050    network
  • code/branches/buildsystem2/src/ogreceguirenderer/CMakeLists.txt

    r2621 r2624  
    1616  ${CEGUI_LIBRARY}
    1717)
    18 IF (NOT WIN32)
     18IF(NOT WIN32)
    1919  INSTALL(TARGETS ogreceguirenderer_orxonox LIBRARY DESTINATION lib)
    20 ENDIF (NOT WIN32)
     20ENDIF()
  • code/branches/buildsystem2/src/ois/CMakeLists.txt

    r2621 r2624  
    2929ELSEIF(UNIX)
    3030  ADD_SUBDIRECTORY(linux)
    31 ENDIF (WIN32)
     31ENDIF()
    3232
    3333GENERATE_SOURCE_GROUPS(${OIS_FILES})
     
    3636INCLUDE_DIRECTORIES(.)
    3737
    38 ADD_LIBRARY(ois_orxonox SHARED ${OIS_FILES} )
     38ADD_LIBRARY(ois_orxonox SHARED ${OIS_FILES})
    3939SET_TARGET_PROPERTIES(ois_orxonox PROPERTIES DEFINE_SYMBOL "OIS_NONCLIENT_BUILD")
    4040
    4141IF(WIN32)
    42   TARGET_LINK_LIBRARIES( ois_orxonox ${DIRECTX_LIBRARIES} )
    43 ENDIF(WIN32)
     42  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
     43ENDIF()
    4444
  • code/branches/buildsystem2/src/orxonox/CMakeLists.txt

    r2621 r2624  
    2727
    2828IF(NETWORKTRAFFIC_TESTING_ENABLED)
    29 
    3029  SET(ORXONOXS_SRC_FILES
    3130    GraphicsEngine.cc
     
    3332    CameraManager.cc
    3433  )
    35 
    3634  ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES})
    3735ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
     
    6159  IF(CMAKE_CL_64)
    6260    SET(MSVC_PLATFORM "x64")
    63   ELSE(CMAKE_CL_64)
     61  ELSE()
    6462    SET(MSVC_PLATFORM "Win32")
    65   ENDIF(CMAKE_CL_64)
     63  ENDIF()
    6664  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
    6765ENDIF(MSVC)
    6866
    69 IF (NOT WIN32)
     67IF(NOT WIN32)
    7068  INSTALL(TARGETS orxonox RUNTIME DESTINATION bin)
    71 ENDIF (NOT WIN32)
     69ENDIF()
  • code/branches/buildsystem2/src/tinyxml/CMakeLists.txt

    r2621 r2624  
    1515IF(MSVC)
    1616  ADD_LIBRARY(tinyxml++_orxonox STATIC ${TINYXML++_FILES})
    17 ELSE(MSVC)
     17ELSE()
    1818  ADD_LIBRARY(tinyxml++_orxonox SHARED ${TINYXML++_FILES})
    19 ENDIF(MSVC)
     19ENDIF()
    2020
    21 IF (NOT WIN32)
     21IF(NOT WIN32)
    2222  INSTALL(TARGETS tinyxml++_orxonox LIBRARY DESTINATION lib)
    23 ENDIF (NOT WIN32)
     23ENDIF()
  • code/branches/buildsystem2/src/tolua/CMakeLists.txt

    r2621 r2624  
    1919TARGET_LINK_LIBRARIES(tolua++_orxonox ${LUA_LIBRARIES})
    2020
    21 IF (NOT WIN32)
     21IF(NOT WIN32)
    2222#  INSTALL(TARGETS tolualib_orxonox LIBRARY DESTINATION lib)
    23 ENDIF (NOT WIN32)
     23ENDIF()
    2424
    2525
  • code/branches/buildsystem2/src/util/CMakeLists.txt

    r2621 r2624  
    2323TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY})
    2424
    25 IF (NOT WIN32)
     25IF(NOT WIN32)
    2626  INSTALL(TARGETS util LIBRARY DESTINATION lib)
    27 ENDIF (NOT WIN32)
     27ENDIF()
Note: See TracChangeset for help on using the changeset viewer.