Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 23, 2009, 8:57:42 PM (15 years ago)
Author:
rgrieder
Message:
  • Moved def_keybindings to media repository in folder defaultConfig
  • If you have a better name for that folder, you're welcome
  • the "def_" prefix has been removed
  • ConfigFileManager now looks for a file in media/defaultConfig with the same name if the config file does not exist yet
  • No file gets written while only loading
  • Removed hacky GCC 3 warning code for each library and instead just put "Wno-sign-compare" to the GCC 3 flags (that will remove all boost::filesystem warnings)
  • ogre.cfg still remains on tardis for the development build (not install though)
Location:
code/branches/buildsystem3/config
Files:
2 deleted
1 edited

Legend:

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

    r2685 r2690  
    2020SET(ORXONOX_CONFIG_DEV_PATH ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE)
    2121
    22 SET(READ_ONLY_CONFIG_FILES
    23   def_keybindings.ini
    24   def_masterKeybindings.ini
    25 )
    26 
    27 SET(WRITABLE_CONFIG_FILES
    28 )
    29 
    3022IF(TARDIS)
    3123  # OGRE can't find fonts to display config screen on Tardis,
    3224  # so providing default config file here (bug).
    33   LIST(APPEND WRITABLE_CONFIG_FILES ogre.cfg)
     25  # Cause: Ogre 1.4.5 was compiled for an older debian version
     26  IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ogre.cfg)
     27    CONFIGURE_FILE(ogre.cfg ${CMAKE_CURRENT_BINARY_DIR}/ogre.cfg COPYONLY)
     28  ENDIF()
    3429ENDIF(TARDIS)
    35 
    36 # We need the same code for both READ_ONLY and WRITABLE config files
    37 MACRO(CONFIGURE_FILES _file_name _build_configs _read_only_arg)
    38   SET(_read_only ${_read_only_arg})
    39   FOREACH(_build_config ${_build_configs})
    40     # Is there an extra file in bin/Debug or bin/Release?
    41     IF(${_build_config} MATCHES "Rel")
    42       SET(_build_config_short "Release")
    43     ELSE()
    44       SET(_build_config_short "Debug")
    45     ENDIF()
    46     IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
    47       SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_build_config_short}/${_file_name})
    48     ELSE()
    49       SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file_name})
    50     ENDIF()
    51 
    52     # Copy to the folder named like the build config for Visual Studio
    53     IF(CMAKE_CONFIGURATION_TYPES)
    54       SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${_build_config}/${_file_name})
    55     ELSE()
    56       SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${_file_name})
    57     ENDIF()
    58     # Only copy if target file doesn't exist. This may result in problems but
    59     # otherwise we might delete a user's config
    60     IF(NOT EXISTS ${_out_file} OR _read_only)
    61       CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
    62     ENDIF()
    63   ENDFOREACH(_build_config)
    64 ENDMACRO(CONFIGURE_FILES)
    65 
    66 # Copy config files to all Visual Studio output directories
    67 IF(CMAKE_CONFIGURATION_TYPES)
    68   SET(BUILD_CONFIGS ${CMAKE_CONFIGURATION_TYPES})
    69 ELSE()
    70   SET(BUILD_CONFIGS ${CMAKE_BUILD_TYPE})
    71 ENDIF()
    72 
    73 FOREACH(_file_name ${READ_ONLY_CONFIG_FILES})
    74   CONFIGURE_FILES("${_file_name}" "${BUILD_CONFIGS}" TRUE)
    75 ENDFOREACH(_file_name)
    76 FOREACH(_file_name ${WRITABLE_CONFIG_FILES})
    77   CONFIGURE_FILES("${_file_name}" "${BUILD_CONFIGS}" FALSE)
    78 ENDFOREACH(_file_name)
    79 
    80 
    81 ################ Installation #################
    82 
    83 # Not using collective call to allow configuration with CMake.
    84 FOREACH(_file ${READ_ONLY_CONFIG_FILES} ${WRITABLE_CONFIG_FILES})
    85   IF(CMAKE_CONFIGURATION_TYPES)
    86     FOREACH(_configuration ${CMAKE_CONFIGURATION_TYPES})
    87       INSTALL(
    88         FILES ${CMAKE_CURRENT_BINARY_DIR}/${_configuration}/${_file}
    89         DESTINATION ${ORXONOX_CONFIG_INSTALL_PATH}
    90         CONFIGURATIONS ${_configuration}
    91       )
    92     ENDFOREACH(_configuration)
    93   ELSE()
    94     INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_file} DESTINATION ${ORXONOX_CONFIG_INSTALL_PATH})
    95   ENDIF()
    96 ENDFOREACH(_file)
Note: See TracChangeset for help on using the changeset viewer.