Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2720


Ignore:
Timestamp:
Mar 1, 2009, 5:15:12 PM (16 years ago)
Author:
rgrieder
Message:

Moved media/CMakeLists.txt to cmake/Media.cmake to allow media checkout in media/

Location:
code/trunk
Files:
1 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/trunk/CMakeLists.txt

    r2718 r2720  
    5252
    5353# Configure media directory location and installation
    54 ADD_SUBDIRECTORY(media)
     54INCLUDE(Media)
    5555
    5656# Remaining tardis hack
  • code/trunk/cmake/Media.cmake

    r2714 r2720  
    2424 #
    2525
    26 # This directory has to concur with the name set in BuildConfig.cmake
    27 IF(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH}")
    28   MESSAGE(FATAL_ERROR "Value of DEFAULT_MEDIA_PATH does not concur with the name of the media directory in the source tree")
    29 ENDIF()
    30 
    3126# Specify media directory
    32 GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../media ABSOLUTE)
    33 FIND_PATH(CMAKE_MEDIA_OUTPUT_DIRECTORY resources.cfg
     27GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE)
     28FIND_PATH(MEDIA_PATH resources.cfg
    3429  PATHS
    35     ${CMAKE_CURRENT_SOURCE_DIR}
     30    ${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH}
    3631    ${_search_path_1}
    3732  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
    3833)
     34
     35# For consistency with other variables for config, log, bin, etc.
     36SET(CMAKE_MEDIA_OUTPUT_DIRECTORY MEDIA_PATH)
     37
    3938IF(NOT CMAKE_MEDIA_OUTPUT_DIRECTORY)
    40   MESSAGE(STATUS "Warning: Media directory not found. If you want to compile while downloading the media files, you must specify the directory by Hand BEFORE compiling! Default location is orxonox_root/media")
     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")
    4140  # Temporary override to the default location.
    4241  SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media)
    43   SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media PARENT_SCOPE)
    4442ENDIF()
    4543
Note: See TracChangeset for help on using the changeset viewer.