Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2684


Ignore:
Timestamp:
Feb 19, 2009, 5:50:04 PM (16 years ago)
Author:
rgrieder
Message:

Added convenience run script again on request, but to the build directory this time.

Location:
code/branches/buildsystem3/bin
Files:
1 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem3/bin/CMakeLists.txt

    r2680 r2684  
    115115# Create a run script for Windows to manually add the DLL path when executing
    116116IF(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)
     118ELSEIF(UNIX)
     119  SET(RUN_SCRIPT run)
     120ENDIF()
     121
     122IF(NOT CMAKE_CONFIGURATION_TYPES)
     123  SET(_subdirs .)
     124  SEt(_default_subdir .)
     125ELSE()
     126  SET(_subdirs ${CMAKE_CONFIGURATION_TYPES})
     127  SEt(_default_subdir Debug)
     128ENDIF()
     129STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY})
     130FOREACH(_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)
    121141  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)
     142ENDFOREACH(_subdir)
  • code/branches/buildsystem3/bin/run.in

    r2679 r2684  
    22# convenience script for starting orxonox on Linux
    33
    4 cd @CMAKE_RUNTIME_OUTPUT_DIRECTORY@ && exec ./@ORXONOX_EXECUTABLE_NAME@ $@
     4cd @CURRENT_RUNTIME_DIR@ && exec ./@ORXONOX_EXECUTABLE_NAME@ $@
Note: See TracChangeset for help on using the changeset viewer.