Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2009, 9:12:24 PM (15 years ago)
Author:
rgrieder
Message:

Prepared build system for an external media directory.
This revision only runs in console mode! (tcl files working again)

Location:
code/branches/resource2/cmake
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/cmake/BuildConfig.cmake

    r3330 r5641  
    4040SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LIBRARY_PATH})
    4141SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_ARCHIVE_PATH})
    42 # Do not set doc and media, rather check in the two subdirectories
    43 # whether they concur with the DEFAULT_..._PATH
     42SET(CMAKE_DOC_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_DOC_PATH})
     43# Media directories are only inputs
    4444SET(CMAKE_CONFIG_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/${DEFAULT_CONFIG_PATH})
    4545SET(CMAKE_LOG_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_LOG_PATH})
     
    5050# Sets where to find the external libraries like OgreMain.dll at runtime
    5151# On Unix you should not have to change this at all.
    52 IF(NOT ORXONOX_RUNTIME_LIBRARY_DIRECTORY)
    53   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
     52IF(NOT RUNTIME_LIBRARY_DIRECTORY)
     53  SET(RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
    5454ENDIF()
    5555
     
    126126ENDIF()
    127127
    128 IF(INSTALL_COPYABLE)
    129   # Note the relative paths. They will be resolved at runtime.
    130   # For CMake operations CMAKE_INSTALL_PREFIX is always appended.
    131   SET(ORXONOX_RUNTIME_INSTALL_PATH ${DEFAULT_RUNTIME_PATH})
    132   SET(ORXONOX_LIBRARY_INSTALL_PATH ${DEFAULT_LIBRARY_PATH})
    133   SET(ORXONOX_ARCHIVE_INSTALL_PATH ${DEFAULT_ARCHIVE_PATH})
    134   SET(ORXONOX_DOC_INSTALL_PATH     ${DEFAULT_DOC_PATH})
    135   SET(ORXONOX_MEDIA_INSTALL_PATH   ${DEFAULT_MEDIA_PATH})
    136   SET(ORXONOX_CONFIG_INSTALL_PATH  ${DEFAULT_CONFIG_PATH})
    137   SET(ORXONOX_LOG_INSTALL_PATH     ${DEFAULT_LOG_PATH})
    138 
    139 ELSEIF(UNIX) # Apple too?
    140   # Using absolute paths
    141   SET(ORXONOX_RUNTIME_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/bin)
    142   SET(ORXONOX_LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
    143   SET(ORXONOX_ARCHIVE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
    144   SET(ORXONOX_DOC_INSTALL_PATH     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
    145   SET(ORXONOX_MEDIA_INSTALL_PATH   ${CMAKE_INSTALL_PREFIX}/share/orxonox)
    146   # These two paths are user and therefore runtime dependent --> only set relatively
    147   SET(ORXONOX_CONFIG_INSTALL_PATH  ${DEFAULT_CONFIG_PATH})
    148   SET(ORXONOX_LOG_INSTALL_PATH     ${DEFAULT_LOG_PATH})
    149 
    150 ELSEIF(WIN32)
    151   SET(ORXONOX_RUNTIME_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_RUNTIME_PATH})
    152   SET(ORXONOX_LIBRARY_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
    153   SET(ORXONOX_ARCHIVE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
    154   SET(ORXONOX_DOC_INSTALL_PATH     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
    155   SET(ORXONOX_MEDIA_INSTALL_PATH   ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MEDIA_PATH})
     128# Default installation paths
     129SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_RUNTIME_PATH})
     130SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
     131SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
     132SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
     133SET(MEDIA_INSTALL_DIRECTORY   ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MEDIA_PATH})
     134SET(CONFIG_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/${DEFAULT_CONFIG_PATH})
     135SET(LOG_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LOG_PATH})
     136
     137IF(NOT INSTALL_COPYABLE)
     138  IF(UNIX) # Apple too?
     139    # Using absolute paths
     140    SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)
     141    SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
     142    SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
     143    SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
     144    SET(MEDIA_INSTALL_DIRECTORY   ${CMAKE_INSTALL_PREFIX}/share/orxonox)
     145  ENDIF()
     146
    156147  # Leave empty because it is user and therefore runtime dependent
    157   SET(ORXONOX_CONFIG_INSTALL_PATH  ${DEFAULT_CONFIG_PATH})
    158   SET(ORXONOX_LOG_INSTALL_PATH     ${DEFAULT_LOG_PATH})
     148  SET(CONFIG_INSTALL_DIRECTORY)
     149  SET(LOG_INSTALL_DIRECTORY)
    159150ENDIF()
    160151
     
    170161
    171162# the RPATH to be used when installing
    172 SET(CMAKE_INSTALL_RPATH ${ORXONOX_LIBRARY_INSTALL_PATH})
     163IF(INSTALL_COPYABLE)
     164  SET(CMAKE_INSTALL_RPATH ${DEFAULT_LIBRARY_PATH})
     165ELSE()
     166  SET(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_DIRECTORY})
     167ENDIF()
    173168
    174169# add the automatically determined parts of the RPATH
  • code/branches/resource2/cmake/GenerateToluaBindings.cmake

    r3368 r5641  
    3030 #    TOLUA_PARSER_SOURCE - Lua file with the parser source code
    3131 #    TOLUA_PARSER_DEPENDENCIES - All the dependent lua files
    32  #    ORXONOX_RUNTIME_LIBRARY_DIRECTORY - Working directory
     32 #    RUNTIME_LIBRARY_DIRECTORY - Working directory
    3333 #
    3434
     
    7474    DEPENDS           ${TOLUA_PARSER_DEPENDENCIES}
    7575    IMPLICIT_DEPENDS  ${_implicit_dependencies}
    76     WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
     76    WORKING_DIRECTORY ${RUNTIME_LIBRARY_DIRECTORY}
    7777    COMMENT "Generating tolua bind files for package ${_tolua_package}"
    7878  )
  • code/branches/resource2/cmake/PackageConfig.cmake

    r3370 r5641  
    1 # General package configuration. Merely sets the include paths.
    2 # Library files are treated separately.
     1 #
     2 #             ORXONOX - the hottest 3D action shooter ever to exist
     3 #                             > www.orxonox.net <
     4 #
     5 #        This program is free software; you can redistribute it and/or
     6 #         modify it under the terms of the GNU General Public License
     7 #        as published by the Free Software Foundation; either version 2
     8 #            of the License, or (at your option) any later version.
     9 #
     10 #       This program is distributed in the hope that it will be useful,
     11 #        but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 #                 GNU General Public License for more details.
     14 #
     15 #   You should have received a copy of the GNU General Public License along
     16 #      with this program; if not, write to the Free Software Foundation,
     17 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     18 #
     19 #
     20 #  Author:
     21 #    Reto Grieder
     22 #  Description:
     23 #    General package configuration. Merely sets the include paths.
     24 #    Library files are treated separately.
     25 #
    326
    427# Check package version info
  • code/branches/resource2/cmake/PackageConfigMSVC.cmake

    r3370 r5641  
    4747
    4848  # Also the directory with the runtime libraries
    49   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
     49  SET(RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
    5050
    5151  # Sets the library path for the FIND_LIBRARY
  • code/branches/resource2/cmake/PackageConfigMinGW.cmake

    r3196 r5641  
    4040
    4141  # Also the directory with the runtime libraries
    42   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
     42  SET(RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
    4343
    4444  # Sets the library path for the FIND_LIBRARY
  • code/branches/resource2/cmake/TargetUtilities.cmake

    r3371 r5641  
    175175  IF(NOT _arg_STATIC AND NOT _arg_NO_INSTALL)
    176176    INSTALL(TARGETS ${_target_name}
    177       RUNTIME DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH}
    178       LIBRARY DESTINATION ${ORXONOX_LIBRARY_INSTALL_PATH}
    179       #ARCHIVE DESTINATION ${ORXONOX_ARCHIVE_INSTALL_PATH}
     177      RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY}
     178      LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY}
     179      #ARCHIVE DESTINATION ${ARCHIVE_INSTALL_DIRECTORY}
    180180    )
    181181  ENDIF()
Note: See TracChangeset for help on using the changeset viewer.