- Timestamp:
- Jan 30, 2009, 12:48:20 PM (16 years ago)
- Location:
- code/branches/buildsystem2
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2/CMakeLists.txt
r2612 r2624 11 11 IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) 12 12 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})13 ENDIF() 14 14 15 15 # This sets where to look for modules (e.g. "Find*.cmake" files) -
code/branches/buildsystem2/bin-config/CMakeLists.txt
r2621 r2624 25 25 IF(${_build_config} MATCHES "Rel") 26 26 SET(_build_config_short "Release") 27 ELSE( ${_build_config} MATCHES "Rel")27 ELSE() 28 28 SET(_build_config_short "Debug") 29 ENDIF( ${_build_config} MATCHES "Rel")29 ENDIF() 30 30 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name}) 31 31 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() 33 33 SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file_name}) 34 ENDIF( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})34 ENDIF() 35 35 36 36 # Copy to the folder named like the build config for Visual Studio 37 37 IF(CMAKE_CONFIGURATION_TYPES) 38 38 SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_build_config}/${_file_name}) 39 ELSE( CMAKE_CONFIGURATION_TYPES)39 ELSE() 40 40 SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_file_name}) 41 ENDIF( CMAKE_CONFIGURATION_TYPES)41 ENDIF() 42 42 # Only copy if target file doesn't exist. This may result in problems but 43 43 # otherwise we might delete a user's config 44 IF 44 IF(NOT EXISTS ${_out_file} OR _read_only) 45 45 CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY) 46 ENDIF (NOT EXISTS ${_out_file} OR _read_only)46 ENDIF() 47 47 ENDFOREACH(_build_config) 48 48 ENDMACRO(CONFIGURE_FILES) … … 51 51 IF(CMAKE_CONFIGURATION_TYPES) 52 52 SET(BUILD_CONFIGS ${CMAKE_CONFIGURATION_TYPES}) 53 ELSE( CMAKE_CONFIGURATION_TYPES)53 ELSE() 54 54 SET(CONFIG_OUT_PATHS_REL ".") 55 55 SET(BUILD_CONFIGS ${CMAKE_BUILD_TYPE}) 56 ENDIF( CMAKE_CONFIGURATION_TYPES)56 ENDIF() 57 57 58 58 FOREACH(_file_name ${READ_ONLY_CONFIG_FILES}) … … 77 77 SET(RUN_SCRIPT run) 78 78 ENDIF(WIN32) 79 IF 79 IF(NOT EXISTS ${CMAKE_SOURCE_DIR}/${RUN_SCRIPT}) 80 80 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() 82 82 ENDIF(NOT CMAKE_CONFIGURATION_TYPES) -
code/branches/buildsystem2/cmake/BuildConfig.cmake
r2621 r2624 37 37 IF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY) 38 38 SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) 39 ENDIF( NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)39 ENDIF() 40 40 41 41 # Set Debug build to default when not having multi-config generator like msvc … … 44 44 SET(CMAKE_BUILD_TYPE Debug CACHE STRING 45 45 "Build types are: Debug, Release, MinSizeRel, RelWithDebInfo" FORCE) 46 ENDIF( NOT CMAKE_BUILD_TYPE)46 ENDIF() 47 47 MARK_AS_ADVANCED(CLEAR CMAKE_BUILD_TYPE) 48 ELSE( NOT CMAKE_CONFIGURATION_TYPES)48 ELSE() 49 49 IF(CMAKE_BUILD_TYPE) 50 50 SET(CMAKE_BUILD_TYPE CACHE STRING FORCE) 51 ENDIF( CMAKE_BUILD_TYPE)51 ENDIF() 52 52 MARK_AS_ADVANCED(CMAKE_BUILD_TYPE) 53 ENDIF( NOT CMAKE_CONFIGURATION_TYPES)53 ENDIF() 54 54 55 55 OPTION(EXTRA_WARNINGS "Enable some extra warnings (heavily pollutes the output)") … … 61 61 IF(NOT EXISTS ${ORXONOX_MEDIA_DIRECTORY}) 62 62 MESSAGE(STATUS "Warning: The media directory does not exist ${ORXONOX_MEDIA_DIRECTORY}") 63 ENDIF( NOT EXISTS ${ORXONOX_MEDIA_DIRECTORY})63 ENDIF() 64 64 65 65 # More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager … … 88 88 ELSEIF(MSVC) 89 89 INCLUDE(BuildConfigMSVC) 90 ELSE( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)90 ELSE() 91 91 MESSAGE(STATUS "Warning: Your compiler is not officially supported.") 92 ENDIF( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC)92 ENDIF() 93 93 94 94 SET(BUILD_CONFIG_USER_SCRIPT "" CACHE FILEPATH … … 102 102 ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}) 103 103 INCLUDE(${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}) 104 ENDIF( EXISTS ${CMAKE_MODULE_PATH}/${BUILD_CONFIG_USER_SCRIPT}.cmake)104 ENDIF() 105 105 ENDIF(BUILD_CONFIG_USER_SCRIPT) 106 106 -
code/branches/buildsystem2/cmake/BuildConfigGCC.cmake
r2621 r2624 40 40 IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") 41 41 ADD_COMPILER_FLAGS("-fPIC" CACHE) 42 ENDIF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")42 ENDIF() 43 43 44 44 # Increase warning level if requested … … 46 46 REMOVE_COMPILER_FLAGS("-Wall" CACHE) 47 47 ADD_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE) 48 ELSE( EXTRA_WARNINGS)48 ELSE() 49 49 REMOVE_COMPILER_FLAGS("-Wextra --Wno-unused-parameter" CACHE) 50 50 ADD_COMPILER_FLAGS("-Wall" CACHE) 51 ENDIF( EXTRA_WARNINGS)51 ENDIF() 52 52 53 53 # General linker flags -
code/branches/buildsystem2/cmake/BuildConfigMSVC.cmake
r2621 r2624 50 50 REMOVE_COMPILER_FLAGS("-W1 -W2 -W3" CACHE) 51 51 ADD_COMPILER_FLAGS ("-W4" CACHE) 52 ELSE( EXTRA_WARNINGS)52 ELSE() 53 53 REMOVE_COMPILER_FLAGS("-W1 -W2 -W4" CACHE) 54 54 ADD_COMPILER_FLAGS ("-W3" CACHE) 55 ENDIF( EXTRA_WARNINGS)55 ENDIF() 56 56 57 57 # Overwrite CMake default flags here. -
code/branches/buildsystem2/cmake/CheckOGREPlugins.cmake
r2618 r2624 46 46 IF(NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED) 47 47 MESSAGE(FATAL_ERROR "Could not find OGRE plugin named ${_plugin}") 48 ENDIF( NOT OGRE_PLUGIN_${_plugin}_OPTIMIZED)48 ENDIF() 49 49 ELSEIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED) 50 50 SET(OGRE_RENDER_SYSTEM_FOUND TRUE) 51 ENDIF( NOT ${_plugin} MATCHES "RenderSystem")51 ENDIF() 52 52 53 53 IF(OGRE_PLUGIN_${_plugin}_OPTIMIZED) … … 55 55 IF(NOT OGRE_PLUGIN_${_plugin}_DEBUG) 56 56 SET(OGRE_PLUGIN_${_plugin}_DEBUG ${OGRE_PLUGIN_${_plugin}_OPTIMIZED} CACHE STRING "" FORCE) 57 ENDIF( NOT OGRE_PLUGIN_${_plugin}_DEBUG)57 ENDIF() 58 58 MARK_AS_ADVANCED(OGRE_PLUGIN_${_plugin}_OPTIMIZED OGRE_PLUGIN_${_plugin}_DEBUG) 59 59 … … 63 63 IF(OGRE_PLUGINS_FOLDER_RELEASE AND NOT OGRE_PLUGINS_FOLDER_RELEASE STREQUAL _release_folder) 64 64 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() 66 66 SET(OGRE_PLUGINS_FOLDER_RELEASE ${_release_folder}) 67 67 GET_FILENAME_COMPONENT(_debug_folder ${OGRE_PLUGIN_${_plugin}_DEBUG} PATH) 68 68 IF(OGRE_PLUGINS_FOLDER_DEBUG AND NOT OGRE_PLUGINS_FOLDER_DEBUG STREQUAL _debug_folder) 69 69 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() 71 71 SET(OGRE_PLUGINS_FOLDER_DEBUG ${_debug_folder}) 72 72 … … 77 77 IF(OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$") 78 78 LIST(APPEND OGRE_PLUGINS_DEBUG "${_plugin}_d") 79 ELSE( OGRE_PLUGIN_${_plugin}_DEBUG MATCHES "_d\\.|_d$")79 ELSE() 80 80 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() 83 83 LIST(APPEND OGRE_PLUGINS_DEBUG ${_plugin}) 84 ENDIF( OGRE_PLUGIN_${_plugin}_DEBUG)84 ENDIF() 85 85 ENDIF(OGRE_PLUGIN_${_plugin}_OPTIMIZED) 86 86 ENDFOREACH(_plugin) 87 87 IF(NOT OGRE_RENDER_SYSTEM_FOUND) 88 88 MESSAGE(FATAL_ERROR "Could not find an OGRE render system plugin") 89 ENDIF( NOT OGRE_RENDER_SYSTEM_FOUND)89 ENDIF() 90 90 91 91 # List has to be comma separated for orxonox.ini -
code/branches/buildsystem2/cmake/DetermineVersion.cmake
r2613 r2624 24 24 IF(NOT ${_parts_length} EQUAL 3) 25 25 SET(_parts MAJOR MINOR PATCH) 26 ENDIF( NOT ${_parts_length} EQUAL 3)26 ENDIF() 27 27 28 28 FOREACH(_part ${_parts}) … … 31 31 SET(${_name}_VERSION_${_part} ${CMAKE_MATCH_1}) 32 32 SET(${_name}_VERSION_${_part} ${CMAKE_MATCH_1} PARENT_SCOPE) 33 ELSE( _match)33 ELSE() 34 34 SET(${_name}_VERSION_${_part} "0") 35 35 SET(${_name}_VERSION_${_part} "0" PARENT_SCOPE) 36 ENDIF( _match)36 ENDIF() 37 37 IF("${_parts}" MATCHES "^${_part}") # First? 38 38 SET(${_name}_VERSION "${${_name}_VERSION_${_part}}") 39 ELSE( "${_parts}" MATCHES "^${_part}")39 ELSE() 40 40 SET(${_name}_VERSION "${${_name}_VERSION}.${${_name}_VERSION_${_part}}") 41 ENDIF( "${_parts}" MATCHES "^${_part}")41 ENDIF() 42 42 ENDFOREACH(_part) 43 43 SET(${_name}_VERSION "${${_name}_VERSION}" PARENT_SCOPE) -
code/branches/buildsystem2/cmake/FindALUT.cmake
r2616 r2624 45 45 # String is in default search path, don't need to use -F 46 46 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() 50 48 # String is not /Library/Frameworks, need to use -F 51 49 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() 55 51 # Clear the temp variable so nobody can see it 56 52 SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "") 57 53 58 ELSE( ${ALUT_INCLUDE_DIR} MATCHES ".framework")54 ELSE() 59 55 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED 60 56 NAMES alut … … 67 63 PATH_SUFFIXES lib libs 68 64 ) 69 ENDIF( ${ALUT_INCLUDE_DIR} MATCHES ".framework")65 ENDIF() 70 66 71 67 # Handle the REQUIRED argument and set ALUT_FOUND -
code/branches/buildsystem2/cmake/FindENet.cmake
r2616 r2624 42 42 ELSEIF(_enet_header MATCHES "enet_peer_disconnect_later") 43 43 SET(ENET_VERSION 1.1) 44 ELSE( _enet_header MATCHES "enet_socket_set_option")44 ELSE() 45 45 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() 47 ELSE() 48 48 SET(ENET_VERSION 0) # Script doesn't support versions below 1.0 49 ENDIF( _enet_header MATCHES "ENET_VERSION[ \t]*=[ \t]*1")49 ENDIF() 50 50 51 51 # Handle the REQUIRED argument and set ENET_FOUND … … 60 60 # ENet is linked statically, hence we need to add some windows dependencies 61 61 HANDLE_LIBRARY_TYPES(ENET ws2_32 winmm) 62 ELSE( NOT LINK_ENET_DYNAMIC AND WIN32)62 ELSE() 63 63 HANDLE_LIBRARY_TYPES(ENET) 64 ENDIF( NOT LINK_ENET_DYNAMIC AND WIN32)64 ENDIF() 65 65 66 66 MARK_AS_ADVANCED( -
code/branches/buildsystem2/cmake/FindLua.cmake
r2615 r2624 7 7 IF(EXISTS ${_file}) 8 8 FILE(STRINGS ${_file} _file_content REGEX "LUA_VERSION|LUA_RELEASE") 9 ELSE( EXISTS ${_file})9 ELSE() 10 10 SET(${_varname} "0" PARENT_SCOPE) 11 11 RETURN() 12 ENDIF( EXISTS ${_file})12 ENDIF() 13 13 STRING(REGEX REPLACE "^.*LUA_RELEASE[ \t]+\"Lua[ \t]+([.0-9]+)\".*$" "\\1" ${_varname} "${_file_content}") 14 14 IF(${_varname} STREQUAL "${_file_content}") … … 17 17 IF(${_varname} STREQUAL "${_file_content}") 18 18 MESSAGE(FATAL_ERROR "Could not determine Lua version which means this script has a bug") 19 ENDIF( ${_varname} STREQUAL "${_file_content}")19 ENDIF() 20 20 IF(${_varname} MATCHES "^[0-9]+\\.[0-9]+$") 21 21 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() 24 24 SET(${_varname} "${${_varname}}" PARENT_SCOPE) 25 25 ENDFUNCTION(DETERMINE_LUA_VERSION) … … 37 37 # Incorrect version found, abort search 38 38 SET(LUA_5.1_INCLUDE_DIR "LUA_5.1_INCLUDE_DIR-NOTFOUND" CACHE PATH "" FORCE) 39 ELSE( NOT _version_compare EQUAL 0)39 ELSE() 40 40 FIND_LIBRARY(LUA_5.1_LIBRARY_OPTIMIZED 41 41 NAMES lua51 lua5.1 lua … … 52 52 IF(LUA_5.1_LIBRARIES) 53 53 SET(LUA_5.1_FOUND TRUE) 54 ENDIF( LUA_5.1_LIBRARIES)54 ENDIF() 55 55 ENDIF(NOT _version_compare EQUAL 0) 56 56 ENDIF(LUA_5.1_INCLUDE_DIR) … … 68 68 # Incorrect version found, abourt search 69 69 SET(LUA_5.0_INCLUDE_DIR "LUA_5.0_INCLUDE_DIR-NOTFOUND" CACHE PATH "" FORCE) 70 ELSE( NOT _version_compare EQUAL 0)70 ELSE() 71 71 FIND_LIBRARY(LUA_5.0_LUA_LIBRARY_OPTIMIZED 72 72 NAMES lua50 lua5.0 lua5 lua … … 85 85 IF(${LUA_5.0_LUA_LIBRARY} MATCHES "framework") 86 86 SET(LUA_5.0_LIBRARIES ${LUA_5.0_LUA_LIBRARY}) 87 ELSE( ${LUA_5.0_LUA_LIBRARY} MATCHES "framework")87 ELSE() 88 88 FIND_LIBRARY(LUA_5.0_LUALIB_LIBRARY_OPTIMIZED 89 89 NAMES lualib50 lualib5.0 lualib5 lualib … … 101 101 IF(LUA_5.0_LUA_LIBRARY AND LUA_5.0_LUALIB_LIBRARY) 102 102 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() 104 104 ENDIF(${LUA_5.0_LUA_LIBRARY} MATCHES "framework") 105 105 106 106 IF(LUA_5.0_LIBRARIES) 107 107 SET(LUA_5.0_FOUND TRUE) 108 ENDIF( LUA_5.0_LIBRARIES)108 ENDIF() 109 109 ENDIF(NOT _version_compare EQUAL 0) 110 110 ENDIF(LUA_5.0_INCLUDE_DIR) … … 113 113 IF(Lua_FIND_VERSION_EXACT AND NOT Lua_FIND_VERSION MATCHES "^[0-9]*$") 114 114 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]*$")115 ELSE() 116 116 IF(LUA_5.1_FOUND) # Prefer version 5.1 if found 117 117 SET(LUA_VERSION_SELECTION "5.1") 118 118 ELSEIF(LUA_5.0_FOUND) 119 119 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() 121 ENDIF() 122 122 123 123 SET(LUA_INCLUDE_DIR "${LUA_${LUA_VERSION_SELECTION}_INCLUDE_DIR}") … … 136 136 FIND_LIBRARY(UNIX_MATH_LIBRARY m) 137 137 SET(LUA_LIBRARIES ${LUA_LIBRARIES} ${UNIX_MATH_LIBRARY}) 138 ENDIF( UNIX AND NOT APPLE)138 ENDIF() 139 139 ENDIF(LUA_FOUND) 140 140 -
code/branches/buildsystem2/cmake/FindPackageHandleAdvancedArgs.cmake
r2613 r2624 7 7 IF("${_fail_msg}" STREQUAL "DEFAULT_MSG") 8 8 SET(_fail_msg_adv "Could NOT find ${_name}") 9 ELSE( "${_fail_msg}" STREQUAL "DEFAULT_MSG")9 ELSE() 10 10 SET(_fail_msg_adv "${_fail_msg}") 11 ENDIF( "${_fail_msg}" STREQUAL "DEFAULT_MSG")11 ENDIF() 12 12 IF(${_name}_FIND_VERSION_EXACT) 13 13 SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: exactly ${${_name}_FIND_VERSION}") 14 ELSE( ${_name}_FIND_VERSION_EXACT)14 ELSE() 15 15 SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: at least ${${_name}_FIND_VERSION}") 16 ENDIF( ${_name}_FIND_VERSION_EXACT)16 ENDIF() 17 17 FIND_PACKAGE_HANDLE_STANDARD_ARGS("${_name}" "${_fail_msg_adv}" ${ARGN}) 18 18 STRING(TOUPPER ${_name} _NAME_UPPER) … … 31 31 "Your version is ${_version}") 32 32 SET(${_NAME_UPPER}_FOUND FALSE) 33 ENDIF( ${_name}_FIND_VERSION_EXACT AND NOT _compatible EQUAL 0)33 ENDIF() 34 34 ENDIF(${_name}_FIND_VERSION) 35 35 -
code/branches/buildsystem2/cmake/FlagUtilities.cmake
r2620 r2624 23 23 IF(NOT "${_type}" MATCHES "^(STRING|BOOL|PATH|FILEPATH)$") 24 24 MESSAGE(FATAL_ERROR "${_type} is not a valid CACHE entry type") 25 ENDIF( NOT "${_type}" MATCHES "^(STRING|BOOL|PATH|FILEPATH)$")25 ENDIF() 26 26 27 27 IF(NOT DEFINED _INTERNAL_${_varname} OR "${_INTERNAL_${_varname}}" STREQUAL "${${_varname}}") 28 28 SET(${_varname} "${_value}" CACHE ${_type} "${_docstring}" FORCE) 29 ENDIF( NOT DEFINED _INTERNAL_${_varname} OR "${_INTERNAL_${_varname}}" STREQUAL "${${_varname}}")29 ENDIF() 30 30 SET(_INTERNAL_${_varname} "${_value}" CACHE INTERNAL "Do not edit in any case!") 31 31 ENDMACRO(SET_CACHE) … … 69 69 # SET 70 70 SET(_flag_list "${_arg_flag_list}") 71 ELSE( "${_mode}" STREQUAL "SET")71 ELSE() 72 72 # ADD or REMOVE 73 73 SEPARATE_FLAGS("${${_varname}}" _flag_list) … … 75 75 LIST(${_mode} _flag_list "${_flag}") 76 76 ENDFOREACH(_flag) 77 ENDIF( "${_mode}" STREQUAL "SET")77 ENDIF() 78 78 79 79 LIST(REMOVE_DUPLICATES _flag_list) … … 85 85 SET(${_varname} "${_flag_list}" CACHE STRING "${${_varname}}" FORCE) 86 86 SET(${_varname} "${_flag_list}" CACHE STRING "${${_varname}}" FORCE) 87 ELSE( _force)87 ELSE() 88 88 SET_CACHE(${_varname} STRING "${${_varname}}" "${_flag_list}") 89 ENDIF( _force)90 ELSE( _write_to_cache)89 ENDIF() 90 ELSE() 91 91 SET(${_varname} "${_flag_list}") 92 ENDIF( _write_to_cache)92 ENDIF() 93 93 ENDMACRO(_INTERNAL_PARSE_FLAGS) 94 94 … … 121 121 ELSEIF(_arg MATCHES "^[Nn][Oo][Tt]$") 122 122 SET(_invert_condition TRUE) 123 ELSE( _arg MATCHES "${_key_regex}")123 ELSE() 124 124 IF(_invert_condition) 125 125 SET(_invert_condition FALSE) 126 126 IF(${_arg}) 127 127 SET(_arg_cond FALSE) 128 ELSE( ${_arg})128 ELSE() 129 129 SET(_arg_cond TRUE) 130 ENDIF( ${_arg})131 ELSE( _invert_condition)130 ENDIF() 131 ELSE() 132 132 SET(_arg_cond ${${_arg}}) 133 ENDIF( _invert_condition)133 ENDIF() 134 134 IF(_cond AND _arg_cond) 135 135 SET(_cond TRUE) 136 ELSE( _cond AND _arg_cond)136 ELSE() 137 137 SET(_cond FALSE) 138 ENDIF( _cond AND _arg_cond)139 ENDIF( _arg MATCHES "${_key_regex}")138 ENDIF() 139 ENDIF() 140 140 ENDFOREACH(_arg) 141 141 … … 143 143 IF(NOT DEFINED _langs) 144 144 SET(_langs ${_keys}) 145 ENDIF( NOT DEFINED _langs)145 ENDIF() 146 146 147 147 IF(_cond) … … 152 152 _INTERNAL_PARSE_FLAGS(${_mode} "${_flags}" ${_varname}_${_build_type} ${_write_to_cache} ${_force}) 153 153 ENDFOREACH(_build_type) 154 ELSE( DEFINED _build_types)154 ELSE() 155 155 _INTERNAL_PARSE_FLAGS(${_mode} "${_flags}" ${_varname} ${_write_to_cache} ${_force}) 156 ENDIF( DEFINED _build_types)156 ENDIF() 157 157 ENDFOREACH(_lang ${_langs}) 158 158 ENDIF(_cond) -
code/branches/buildsystem2/cmake/HandleLibraryTypes.cmake
r2613 r2624 34 34 PARENT_SCOPE 35 35 ) 36 ELSE( ${_name}_LIBRARY_DEBUG AND ${_name}_LIBRARY_OPTIMIZED)36 ELSE() 37 37 SET(${_name}_LIBRARY 38 38 ${${_name}_LIBRARY_OPTIMIZED} ${ARGN} 39 39 PARENT_SCOPE 40 40 ) 41 ENDIF( ${_name}_LIBRARY_DEBUG AND ${_name}_LIBRARY_OPTIMIZED)41 ENDIF() 42 42 ENDFUNCTION(HANDLE_LIBRARY_TYPES) -
code/branches/buildsystem2/cmake/LibraryConfig.cmake
r2618 r2624 27 27 ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT}) 28 28 INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT}) 29 ENDIF( EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT}.cmake)29 ENDIF() 30 30 ENDIF(LIBRARY_CONFIG_USER_SCRIPT) 31 31 … … 66 66 IF(version_comparison LESS 0) 67 67 SET(LUA_VERSION_REQUEST 5.0) 68 ELSE( version_comparison LESS 0)68 ELSE() 69 69 SET(LUA_VERSION_REQUEST 5.1) 70 ENDIF( version_comparison LESS 0)71 ELSE( CEGUILUA_USE_EXTERNAL_LIBRARY)70 ENDIF() 71 ELSE() 72 72 SET(LUA_VERSION_REQUEST 5) 73 ENDIF( CEGUILUA_USE_EXTERNAL_LIBRARY)73 ENDIF() 74 74 FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED) 75 75 … … 81 81 IF(DEFINED OPENAL_FOUND_FIRST_TIME) 82 82 SET(OPENAL_FOUND_FIRST_TIME FALSE CACHE INTERNAL "") 83 ELSE( DEFINED OPENAL_FOUND_FIRST_TIME)83 ELSE() 84 84 SET(OPENAL_FOUND_FIRST_TIME TRUE CACHE INTERNAL "") 85 85 STRING(REGEX REPLACE "^(.*)/AL$" "\\1" _openal_dir_2 ${OPENAL_INCLUDE_DIR}) 86 86 IF(_openal_dir_2) 87 87 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() 89 ENDIF() 90 90 # Hide variables created by the script 91 91 MARK_AS_ADVANCED( -
code/branches/buildsystem2/cmake/LibraryConfigMSVC.cmake
r2623 r2624 29 29 # Set the library directories when using Visual Studio. # 30 30 31 IF 31 IF(MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) 32 32 MESSAGE(STATUS "Running on MSVC. Using customized paths and options.") 33 33 … … 37 37 ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8) 38 38 SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8") 39 ELSE( EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)39 ELSE() 40 40 MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries") 41 ENDIF( EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)41 ENDIF() 42 42 SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MSVC_LIBRARY_DIR}/bin) 43 43 … … 60 60 SET(ZLIB_LIBRARY optimized ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib 61 61 debug ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib) 62 IF 62 IF($ENV{DXSDK_DIR} STREQUAL "") 63 63 SET(ENV{DXSDK_DIR} ${MSVC_LIBRARY_DIR}/directx-sdk-aug-2007) 64 ENDIF ($ENV{DXSDK_DIR} STREQUAL "")64 ENDIF() 65 65 66 ENDIF 66 ENDIF(MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) -
code/branches/buildsystem2/cmake/LibraryConfigMinGW.cmake
r2621 r2624 31 31 ################################################### 32 32 33 IF 33 IF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) 34 34 MESSAGE(STATUS "Running on MinGW. Using customized paths and options.") 35 35 … … 39 39 ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lis) 40 40 SET(MINGW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../libs") 41 ELSE( EXISTS ${CMAKE_SOURCE_DIR}/libs)41 ELSE() 42 42 MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries") 43 ENDIF( EXISTS ${CMAKE_SOURCE_DIR}/libs)43 ENDIF() 44 44 SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MINGW_LIBRARY_DIR}) 45 45 … … 64 64 SET(ZLIB_LIBRARY "${MINGW_LIBRARY_DIR}/zlib/libzlib.a") 65 65 SET(LINK_ZLIB_DYNAMIC FALSE) 66 IF 66 IF($ENV{DXSDK_DIR} STREQUAL "") 67 67 SET(ENV{DXSDK_DIR} "${MINGW_LIBRARY_DIR}/DXSDK") 68 ENDIF ($ENV{DXSDK_DIR} STREQUAL "")69 ENDIF 68 ENDIF() 69 ENDIF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED) -
code/branches/buildsystem2/cmake/LibraryConfigTardis.cmake
r2618 r2624 4 4 ################################################# 5 5 6 IF 6 IF(UNIX) 7 7 FILE(STRINGS /etc/hostname HOSTNAME LIMIT_COUNT 1) 8 IF 8 IF(${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$") 9 9 SET (TARDIS ON) 10 ENDIF (${HOSTNAME} MATCHES "^tardis-[a-z][0-9][0-9]$")11 ENDIF 10 ENDIF() 11 ENDIF(UNIX) 12 12 13 IF 13 IF(TARDIS) 14 14 MESSAGE(STATUS "Running on D-ITET isg.ee Tardis Computer. Using customized paths.") 15 15 … … 31 31 SET(ENV{OPENALDIR} "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1") 32 32 #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include") 33 ENDIF 33 ENDIF(TARDIS) -
code/branches/buildsystem2/src/CMakeLists.txt
r2621 r2624 54 54 IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION}) 55 55 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() 57 57 58 58 INCLUDE_DIRECTORIES(ceguilua/ceguilua-${CEGUI_VERSION}) 59 59 ADD_SUBDIRECTORY(ceguilua) 60 ENDIF( CEGUILUA_USE_INTERNAL_LIBRARY)60 ENDIF() 61 61 62 62 ADD_SUBDIRECTORY(cpptcl) -
code/branches/buildsystem2/src/ceguilua/CMakeLists.txt
r2623 r2624 21 21 IF(_compare_result EQUAL 1) 22 22 BREAK() # _version > CEGUI_VERSION 23 ENDIF( _compare_result EQUAL 1)23 ENDIF() 24 24 ADD_SUBDIRECTORY(ceguilua-${_version}) 25 25 ENDFOREACH(_version) … … 53 53 ) 54 54 55 IF 55 IF(NOT WIN32) 56 56 INSTALL(TARGETS ceguilua_orxonox LIBRARY DESTINATION lib) 57 ENDIF (NOT WIN32)57 ENDIF() -
code/branches/buildsystem2/src/core/CMakeLists.txt
r2621 r2624 64 64 ) 65 65 66 IF 66 IF(NOT WIN32) 67 67 INSTALL(TARGETS core LIBRARY DESTINATION lib) 68 ENDIF (NOT WIN32)68 ENDIF() -
code/branches/buildsystem2/src/cpptcl/CMakeLists.txt
r2622 r2624 16 16 IF(MSVC) 17 17 ADD_LIBRARY(cpptcl_orxonox STATIC ${CPPTCL_FILES}) 18 ELSE( MSVC)18 ELSE() 19 19 ADD_LIBRARY(cpptcl_orxonox SHARED ${CPPTCL_FILES}) 20 ENDIF( MSVC)20 ENDIF() 21 21 22 22 TARGET_LINK_LIBRARIES(cpptcl_orxonox … … 24 24 ) 25 25 26 IF 26 IF(NOT WIN32) 27 27 INSTALL(TARGETS cpptcl_orxonox LIBRARY DESTINATION lib) 28 ENDIF (NOT WIN32)28 ENDIF() -
code/branches/buildsystem2/src/network/CMakeLists.txt
r2621 r2624 22 22 IF(MINGW) 23 23 ADD_LIBRARY(network ${NETWORK_FILES}) 24 ELSE( MINGW)24 ELSE() 25 25 ADD_LIBRARY(network SHARED ${NETWORK_FILES}) 26 ENDIF( MINGW)26 ENDIF() 27 27 28 28 SET_TARGET_PROPERTIES(network PROPERTIES DEFINE_SYMBOL "NETWORK_SHARED_BUILD") … … 35 35 ) 36 36 37 IF 37 IF(NOT WIN32) 38 38 INSTALL(TARGETS network LIBRARY DESTINATION lib) 39 ENDIF (NOT WIN32)39 ENDIF() 40 40 41 41 # build those parts only on request. 42 42 IF(NETWORK_TESTING_ENABLED) 43 43 ##### test for gamestate stuff ##### 44 SET( 44 SET(TEST_SRC_FILES 45 45 ${NETWORK_SRC_FILES} 46 46 ) 47 47 ADD_EXECUTABLE(networktest ${TEST_SRC_FILES}) 48 TARGET_LINK_LIBRARIES( 48 TARGET_LINK_LIBRARIES(networktest 49 49 ${OGRE_LIBRARY} 50 50 network -
code/branches/buildsystem2/src/ogreceguirenderer/CMakeLists.txt
r2621 r2624 16 16 ${CEGUI_LIBRARY} 17 17 ) 18 IF 18 IF(NOT WIN32) 19 19 INSTALL(TARGETS ogreceguirenderer_orxonox LIBRARY DESTINATION lib) 20 ENDIF (NOT WIN32)20 ENDIF() -
code/branches/buildsystem2/src/ois/CMakeLists.txt
r2621 r2624 29 29 ELSEIF(UNIX) 30 30 ADD_SUBDIRECTORY(linux) 31 ENDIF (WIN32)31 ENDIF() 32 32 33 33 GENERATE_SOURCE_GROUPS(${OIS_FILES}) … … 36 36 INCLUDE_DIRECTORIES(.) 37 37 38 ADD_LIBRARY(ois_orxonox SHARED ${OIS_FILES} 38 ADD_LIBRARY(ois_orxonox SHARED ${OIS_FILES}) 39 39 SET_TARGET_PROPERTIES(ois_orxonox PROPERTIES DEFINE_SYMBOL "OIS_NONCLIENT_BUILD") 40 40 41 41 IF(WIN32) 42 TARGET_LINK_LIBRARIES( ois_orxonox ${DIRECTX_LIBRARIES})43 ENDIF( WIN32)42 TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES}) 43 ENDIF() 44 44 -
code/branches/buildsystem2/src/orxonox/CMakeLists.txt
r2621 r2624 27 27 28 28 IF(NETWORKTRAFFIC_TESTING_ENABLED) 29 30 29 SET(ORXONOXS_SRC_FILES 31 30 GraphicsEngine.cc … … 33 32 CameraManager.cc 34 33 ) 35 36 34 ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES}) 37 35 ENDIF(NETWORKTRAFFIC_TESTING_ENABLED) … … 61 59 IF(CMAKE_CL_64) 62 60 SET(MSVC_PLATFORM "x64") 63 ELSE( CMAKE_CL_64)61 ELSE() 64 62 SET(MSVC_PLATFORM "Win32") 65 ENDIF( CMAKE_CL_64)63 ENDIF() 66 64 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user") 67 65 ENDIF(MSVC) 68 66 69 IF 67 IF(NOT WIN32) 70 68 INSTALL(TARGETS orxonox RUNTIME DESTINATION bin) 71 ENDIF (NOT WIN32)69 ENDIF() -
code/branches/buildsystem2/src/tinyxml/CMakeLists.txt
r2621 r2624 15 15 IF(MSVC) 16 16 ADD_LIBRARY(tinyxml++_orxonox STATIC ${TINYXML++_FILES}) 17 ELSE( MSVC)17 ELSE() 18 18 ADD_LIBRARY(tinyxml++_orxonox SHARED ${TINYXML++_FILES}) 19 ENDIF( MSVC)19 ENDIF() 20 20 21 IF 21 IF(NOT WIN32) 22 22 INSTALL(TARGETS tinyxml++_orxonox LIBRARY DESTINATION lib) 23 ENDIF (NOT WIN32)23 ENDIF() -
code/branches/buildsystem2/src/tolua/CMakeLists.txt
r2621 r2624 19 19 TARGET_LINK_LIBRARIES(tolua++_orxonox ${LUA_LIBRARIES}) 20 20 21 IF 21 IF(NOT WIN32) 22 22 # INSTALL(TARGETS tolualib_orxonox LIBRARY DESTINATION lib) 23 ENDIF (NOT WIN32)23 ENDIF() 24 24 25 25 -
code/branches/buildsystem2/src/util/CMakeLists.txt
r2621 r2624 23 23 TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY}) 24 24 25 IF 25 IF(NOT WIN32) 26 26 INSTALL(TARGETS util LIBRARY DESTINATION lib) 27 ENDIF (NOT WIN32)27 ENDIF()
Note: See TracChangeset
for help on using the changeset viewer.