[2644] | 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 | # Finds the media directory and configures it's installation. |
---|
| 24 | # |
---|
| 25 | |
---|
| 26 | # Specify media directory |
---|
[2673] | 27 | GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../media ABSOLUTE) |
---|
[2685] | 28 | FIND_PATH(ORXONOX_MEDIA_DEV_PATH resources.cfg |
---|
[2650] | 29 | PATHS |
---|
| 30 | ${CMAKE_CURRENT_SOURCE_DIR} |
---|
[2673] | 31 | ${_search_path_1} |
---|
[2644] | 32 | ) |
---|
[2685] | 33 | IF(NOT ORXONOX_MEDIA_DEV_PATH) |
---|
[2644] | 34 | 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") |
---|
| 35 | # Temporary override to the default location. |
---|
[2685] | 36 | SET(ORXONOX_MEDIA_DEV_PATH ${CMAKE_SOURCE_DIR}/media) |
---|
| 37 | SET(ORXONOX_MEDIA_DEV_PATH ${CMAKE_SOURCE_DIR}/media PARENT_SCOPE) |
---|
[2644] | 38 | ENDIF() |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | ################ Installation ################# |
---|
| 42 | |
---|
[2670] | 43 | # Try no to copy both tcl script file libraries |
---|
| 44 | IF(TCL_LIBRARY MATCHES "85|8\\.5") |
---|
| 45 | SET(TCL_EXCLUDE_PATTERN "tcl8\\.4") |
---|
| 46 | ELSEIF(TCL_LIBRARY MATCHES "84|8\\.4") |
---|
| 47 | SET(TCL_EXCLUDE_PATTERN "tcl8\\.5") |
---|
| 48 | ENDIF() |
---|
| 49 | |
---|
[2657] | 50 | INSTALL( |
---|
[2685] | 51 | DIRECTORY ${ORXONOX_MEDIA_DEV_PATH}/ |
---|
[2657] | 52 | DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH} |
---|
[2670] | 53 | REGEX "\\.svn$|_svn$|backToPNG|${TCL_EXCLUDE_PATTERN}" EXCLUDE |
---|
[2657] | 54 | ) |
---|