Changeset 5645 for code/branches/resource2/media
- Timestamp:
- Aug 13, 2009, 10:50:07 PM (15 years ago)
- Location:
- code/branches/resource2
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource2
- Property svn:externals
-
old new 1 media_stripped http://svn.orxonox.net/game/data/branches/media_stripped1 data_stripped https://svn.orxonox.net/game/data/branches/media_stripped
-
- Property svn:externals
-
code/branches/resource2/media/CMakeLists.txt
r5641 r5645 21 21 # Reto Grieder 22 22 # Description: 23 # Finds the external media directory and configures the media installation.24 # Default search paths are: ../../ media and ../media_extern23 # Finds the external data directory and configures the data installation. 24 # Default search paths are: ../../data and ../data_extern 25 25 # 26 26 27 # For dev runs we've got two media directory. The one from the other repository root folder28 # is called EXTERNAL_ MEDIA29 SET( MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})30 SET( MEDIA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)27 # For dev runs we've got two data directory. The one from the other repository root folder 28 # is called EXTERNAL_DATA 29 SET(DATA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 30 SET(DATA_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) 31 31 32 # Specify media directory33 GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_ MEDIA_PATH} ABSOLUTE)34 FIND_PATH(EXTERNAL_ MEDIA_DIRECTORY resources.oxr32 # Specify data directory 33 GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_DATA_PATH} ABSOLUTE) 34 FIND_PATH(EXTERNAL_DATA_DIRECTORY resources.oxr 35 35 PATHS 36 ${CMAKE_SOURCE_DIR}/ media_extern36 ${CMAKE_SOURCE_DIR}/data_extern 37 37 ${_search_path_1} 38 38 NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH 39 39 ) 40 40 41 IF(NOT EXTERNAL_ MEDIA_DIRECTORY)42 MESSAGE(STATUS "Warning: External 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. \\n You can specify your own folder with the MEDIA_DIRECTORY variable. Default location for the path is orxonox_root/media_extern")41 IF(NOT EXTERNAL_DATA_DIRECTORY) 42 MESSAGE(STATUS "Warning: External data 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. \\n You can specify your own folder with the DATA_DIRECTORY variable. Default location for the path is orxonox_root/data_extern") 43 43 # Temporary override to the default location. 44 SET(EXTERNAL_ MEDIA_DIRECTORY ${CMAKE_SOURCE_DIR}/media_extern)44 SET(EXTERNAL_DATA_DIRECTORY ${CMAKE_SOURCE_DIR}/data_extern) 45 45 ENDIF() 46 46 … … 50 50 # Internal directory 51 51 INSTALL( 52 DIRECTORY ${ MEDIA_DIRECTORY}/53 DESTINATION ${ MEDIA_INSTALL_DIRECTORY}52 DIRECTORY ${DATA_DIRECTORY}/ 53 DESTINATION ${DATA_INSTALL_DIRECTORY} 54 54 REGEX "\\.svn$|_svn$|CMakeLists.txt|InstallScript.cmake" EXCLUDE 55 55 ) 56 56 # External directory 57 57 INSTALL( 58 DIRECTORY ${EXTERNAL_ MEDIA_DIRECTORY}/59 DESTINATION ${ MEDIA_INSTALL_DIRECTORY}58 DIRECTORY ${EXTERNAL_DATA_DIRECTORY}/ 59 DESTINATION ${DATA_INSTALL_DIRECTORY} 60 60 REGEX "\\.svn$|_svn$|resources\\.oxr" EXCLUDE 61 61 ) 62 62 # Configure the install scripts (variables not available during installation) 63 CONFIGURE_FILE( MediaInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/MediaInstallScript.cmake @ONLY)63 CONFIGURE_FILE(DataInstallScript.cmake ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake @ONLY) 64 64 # Join both resources.oxr files 65 INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/ MediaInstallScript.cmake)65 INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/DataInstallScript.cmake) -
code/branches/resource2/media/DataInstallScript.cmake
r5644 r5645 29 29 30 30 # Write some comment 31 FILE(APPEND @ MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ----------------------------------------- -->")32 FILE(APPEND @ MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- Content from the external media directory -->")33 FILE(APPEND @ MEDIA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- ----------------------------------------- -->\n\n")31 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n\n\n <!-- ---------------------------------------- -->") 32 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- Content from the external data directory -->") 33 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr "\n <!-- ---------------------------------------- -->\n\n") 34 34 35 35 # Append the external file 36 FILE(READ @EXTERNAL_ MEDIA_DIRECTORY@/resources.oxr _external_file)37 FILE(APPEND @ MEDIA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})36 FILE(READ @EXTERNAL_DATA_DIRECTORY@/resources.oxr _external_file) 37 FILE(APPEND @DATA_INSTALL_DIRECTORY@/resources.oxr ${_external_file})
Note: See TracChangeset
for help on using the changeset viewer.