Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 24, 2009, 8:17:56 PM (15 years ago)
Author:
rgrieder
Message:

Merged revision 5641 to resource3:

  • Prepared build system for an external media directory.
Location:
code/branches/resource3/media
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • code/branches/resource3/media/CMakeLists.txt

    r5675 r5679  
    2121 #    Reto Grieder
    2222 #  Description:
    23  #    Finds the media directory and configures it's installation.
     23 #    Finds the external media directory and configures the media installation.
     24 #    Default search paths are: ../../media and ../media_extern
    2425 #
     26
     27# For dev runs we've got two media directory. The one from the other repository root folder
     28# is called EXTERNAL_MEDIA
     29SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
     30SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
    2531
    2632# Specify media directory
    2733GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE)
    28 FIND_PATH(MEDIA_PATH resources.cfg
     34FIND_PATH(EXTERNAL_MEDIA_DIRECTORY resources.oxr
    2935  PATHS
    30     ${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH}
     36    ${CMAKE_SOURCE_DIR}/media_extern
    3137    ${_search_path_1}
    3238  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
    3339)
    3440
    35 # For consistency with other variables for config, log, bin, etc.
    36 SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${MEDIA_PATH})
    37 
    38 IF(NOT CMAKE_MEDIA_OUTPUT_DIRECTORY)
    39   MESSAGE(STATUS "Warning: Media directory not found. If you want to compile while downloading the media files, you will have to recompile about four files afterwards and relink everything. Default location is orxonox_root/media")
     41IF(NOT EXTERNAL_MEDIA_DIRECTORY)
     42  MESSAGE(STATUS "Warning: External media directory not found. If you want to compile while downloading the data files, you will have to recompile about four files afterwards and relink everything.")
     43  MESSAGE(STATUS "You can specify your own folder with the EXTERNAL_MEDIA_DIRECTORY variable. Default location for the path is orxonox_root/media_extern")
    4044  # Temporary override to the default location.
    41   SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media)
     45  SET(EXTERNAL_MEDIA_DIRECTORY ${CMAKE_SOURCE_DIR}/media_extern)
    4246ENDIF()
    4347
     
    4549################ Installation #################
    4650
     51# External directory
    4752INSTALL(
    48   DIRECTORY ${CMAKE_MEDIA_OUTPUT_DIRECTORY}/
    49   DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH}
    50   REGEX "\\.svn$|_svn$|backToPNG" EXCLUDE
     53  DIRECTORY ${EXTERNAL_MEDIA_DIRECTORY}/
     54  DESTINATION ${MEDIA_INSTALL_DIRECTORY}
     55  REGEX "\\.svn$|_svn$" EXCLUDE
    5156)
Note: See TracChangeset for help on using the changeset viewer.