Changeset 2685 for code/branches/buildsystem3/bin
- Timestamp:
- Feb 20, 2009, 5:32:04 PM (16 years ago)
- Location:
- code/branches/buildsystem3/bin
- Files:
-
- 1 added
- 6 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/bin/CMakeLists.txt
r2684 r2685 21 21 # Reto Grieder 22 22 # Description: 23 # Configures the binary output directory with files required for Orxonox 24 # to run like orxonox.ini or the default keybindings. 25 # Also creates a run-script in the root directory of the build tree. 23 # Creates a run-script in the root directory of the build tree. 26 24 # 27 28 SET(READ_ONLY_CONFIG_FILES29 def_keybindings.ini30 def_masterKeybindings.ini31 disco.txt32 irc.tcl33 remote.tcl34 telnet_server.tcl35 )36 25 37 SET(WRITABLE_CONFIG_FILES 38 ) 39 40 # Not getting installed 41 SET(ORXONOX_INI orxonox.ini) 42 43 IF(TARDIS) 44 # OGRE can't find fonts to display config screen on Tardis, 45 # so providing default config file here (bug). 46 LIST(APPEND WRITABLE_CONFIG_FILES ogre.cfg) 47 ENDIF(TARDIS) 48 49 # We need the same code for both READ_ONLY and WRITABLE config files 50 MACRO(CONFIGURE_FILES _file_name _build_configs _read_only_arg) 51 SET(_read_only ${_read_only_arg}) 52 FOREACH(_build_config ${_build_configs}) 53 # Is there an extra file in bin/Debug or bin/Release? 54 IF(${_build_config} MATCHES "Rel") 55 SET(_build_config_short "Release") 56 ELSE() 57 SET(_build_config_short "Debug") 58 ENDIF() 59 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name}) 60 SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name}) 61 ELSE() 62 SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file_name}) 63 ENDIF() 64 65 # Copy to the folder named like the build config for Visual Studio 66 IF(CMAKE_CONFIGURATION_TYPES) 67 SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_build_config}/${_file_name}) 68 ELSE() 69 SET(_out_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_file_name}) 70 ENDIF() 71 # Only copy if target file doesn't exist. This may result in problems but 72 # otherwise we might delete a user's config 73 IF(NOT EXISTS ${_out_file} OR _read_only) 74 CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY) 75 ENDIF() 76 ENDFOREACH(_build_config) 77 ENDMACRO(CONFIGURE_FILES) 78 79 # Copy config files to all Visual Studio output directories 80 IF(CMAKE_CONFIGURATION_TYPES) 81 SET(BUILD_CONFIGS ${CMAKE_CONFIGURATION_TYPES}) 82 ELSE() 83 SET(CONFIG_OUT_PATHS_REL ".") 84 SET(BUILD_CONFIGS ${CMAKE_BUILD_TYPE}) 85 ENDIF() 86 87 FOREACH(_file_name ${READ_ONLY_CONFIG_FILES}) 88 CONFIGURE_FILES("${_file_name}" "${BUILD_CONFIGS}" TRUE) 89 ENDFOREACH(_file_name) 90 FOREACH(_file_name ${WRITABLE_CONFIG_FILES} ${ORXONOX_INI}) 91 CONFIGURE_FILES("${_file_name}" "${BUILD_CONFIGS}" FALSE) 92 ENDFOREACH(_file_name) 93 94 95 ################ Installation ################# 96 97 # Not using collective call to allow configuration with CMake. 98 FOREACH(_file ${READ_ONLY_CONFIG_FILES} ${WRITABLE_CONFIG_FILES}) 99 IF(CMAKE_CONFIGURATION_TYPES) 100 FOREACH(_configuration ${CMAKE_CONFIGURATION_TYPES}) 101 INSTALL( 102 FILES ${CMAKE_BINARY_DIR}/bin/${_configuration}/${_file} 103 DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH} 104 CONFIGURATIONS ${_configuration} 105 ) 106 ENDFOREACH(_configuration) 107 ELSE() 108 INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${_file} DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH}) 109 ENDIF() 110 ENDFOREACH(_file) 26 ############ Configure Dev Build ############## 111 27 112 28 … … 140 56 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT}.in ${CMAKE_BINARY_DIR}/${RUN_SCRIPT} @ONLY) 141 57 ENDIF() 58 59 # In order to evaluate at run time whether it is a dev build in the build tree, 60 # we plant a special file 61 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/orxonox_dev_build.keep_me ${CURRENT_RUNTIME_DIR}/orxonox_dev_build.keep_me) 142 62 ENDFOREACH(_subdir)
Note: See TracChangeset
for help on using the changeset viewer.