Changeset 2684 for code/branches/buildsystem3/bin
- Timestamp:
- Feb 19, 2009, 5:50:04 PM (16 years ago)
- Location:
- code/branches/buildsystem3/bin
- Files:
-
- 1 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/bin/CMakeLists.txt
r2680 r2684 115 115 # Create a run script for Windows to manually add the DLL path when executing 116 116 IF(WIN32) 117 IF(NOT CMAKE_CONFIGURATION_TYPES) 118 SET(_config_types ".") 119 ELSE() 120 SET(_config_types ${CMAKE_CONFIGURATION_TYPES}) 117 SET(RUN_SCRIPT run.bat) 118 ELSEIF(UNIX) 119 SET(RUN_SCRIPT run) 120 ENDIF() 121 122 IF(NOT CMAKE_CONFIGURATION_TYPES) 123 SET(_subdirs .) 124 SEt(_default_subdir .) 125 ELSE() 126 SET(_subdirs ${CMAKE_CONFIGURATION_TYPES}) 127 SEt(_default_subdir Debug) 128 ENDIF() 129 STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}) 130 FOREACH(_subdir ${_subdirs}) 131 GET_FILENAME_COMPONENT(CURRENT_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_subdir} ABSOLUTE) 132 133 # Note: Do not use FILE(TO_NATIVE_PATH) because it doesn't work for MinGW 134 STRING(REGEX REPLACE "^([A-Z]\\:)\\/.*$" "\\1" WINDOWS_DRIVE_CHANGE ${CURRENT_RUNTIME_DIR}) 135 STRING(REPLACE "/" "\\" CURRENT_RUNTIME_DIR_WINDOWS ${CURRENT_RUNTIME_DIR}) 136 137 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT}.in ${CURRENT_RUNTIME_DIR}/${RUN_SCRIPT} @ONLY) 138 IF(_subdir STREQUAL _default_subdir) 139 # Convenience script to be used when sitting in the binary directory. Defaults to Debug for msvc. 140 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT}.in ${CMAKE_BINARY_DIR}/${RUN_SCRIPT} @ONLY) 121 141 ENDIF() 122 FOREACH(_configuration ${_config_types}) 123 GET_FILENAME_COMPONENT(CURRENT_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_configuration} ABSOLUTE) 124 125 # Note: Do not use FILE(TO_NATIVE_PATH) because it doesn't work for MinGW 126 STRING(REGEX REPLACE "^([A-Z]\\:)\\/.*$" "\\1" WINDOWS_DRIVE_CHANGE ${CURRENT_RUNTIME_DIR}) 127 STRING(REPLACE "/" "\\" CURRENT_RUNTIME_DIR_WINDOWS ${CURRENT_RUNTIME_DIR}) 128 STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}) 129 130 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/run.bat ${CURRENT_RUNTIME_DIR}/run.bat @ONLY) 131 ENDFOREACH(_configuration) 132 ENDIF(WIN32) 142 ENDFOREACH(_subdir) -
code/branches/buildsystem3/bin/run.in
r2679 r2684 2 2 # convenience script for starting orxonox on Linux 3 3 4 cd @C MAKE_RUNTIME_OUTPUT_DIRECTORY@ && exec ./@ORXONOX_EXECUTABLE_NAME@ $@4 cd @CURRENT_RUNTIME_DIR@ && exec ./@ORXONOX_EXECUTABLE_NAME@ $@
Note: See TracChangeset
for help on using the changeset viewer.