Changeset 5679 for code/branches/resource3/media/CMakeLists.txt
- Timestamp:
- Aug 24, 2009, 8:17:56 PM (15 years ago)
- Location:
- code/branches/resource3/media
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource3/media/CMakeLists.txt
r5675 r5679 21 21 # Reto Grieder 22 22 # 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 24 25 # 26 27 # For dev runs we've got two media directory. The one from the other repository root folder 28 # is called EXTERNAL_MEDIA 29 SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 30 SET(MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) 25 31 26 32 # Specify media directory 27 33 GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE) 28 FIND_PATH( MEDIA_PATH resources.cfg34 FIND_PATH(EXTERNAL_MEDIA_DIRECTORY resources.oxr 29 35 PATHS 30 ${CMAKE_SOURCE_DIR}/ ${DEFAULT_MEDIA_PATH}36 ${CMAKE_SOURCE_DIR}/media_extern 31 37 ${_search_path_1} 32 38 NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH 33 39 ) 34 40 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") 41 IF(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") 40 44 # 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) 42 46 ENDIF() 43 47 … … 45 49 ################ Installation ################# 46 50 51 # External directory 47 52 INSTALL( 48 DIRECTORY ${ CMAKE_MEDIA_OUTPUT_DIRECTORY}/49 DESTINATION ${ ORXONOX_MEDIA_INSTALL_PATH}50 REGEX "\\.svn$|_svn$ |backToPNG" EXCLUDE53 DIRECTORY ${EXTERNAL_MEDIA_DIRECTORY}/ 54 DESTINATION ${MEDIA_INSTALL_DIRECTORY} 55 REGEX "\\.svn$|_svn$" EXCLUDE 51 56 )
Note: See TracChangeset
for help on using the changeset viewer.