[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 |
---|
[2720] | 27 | GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE) |
---|
| 28 | FIND_PATH(MEDIA_PATH resources.cfg |
---|
[2650] | 29 | PATHS |
---|
[2720] | 30 | ${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH} |
---|
[2673] | 31 | ${_search_path_1} |
---|
[2711] | 32 | NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH |
---|
[2644] | 33 | ) |
---|
[2720] | 34 | |
---|
| 35 | # For consistency with other variables for config, log, bin, etc. |
---|
[2721] | 36 | SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${MEDIA_PATH}) |
---|
[2720] | 37 | |
---|
[2702] | 38 | IF(NOT CMAKE_MEDIA_OUTPUT_DIRECTORY) |
---|
[2720] | 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") |
---|
[2644] | 40 | # Temporary override to the default location. |
---|
[2702] | 41 | SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media) |
---|
[2644] | 42 | ENDIF() |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | ################ Installation ################# |
---|
| 46 | |
---|
[2657] | 47 | INSTALL( |
---|
[2702] | 48 | DIRECTORY ${CMAKE_MEDIA_OUTPUT_DIRECTORY}/ |
---|
[2657] | 49 | DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH} |
---|
[3345] | 50 | REGEX "\\.svn$|_svn$|backToPNG" EXCLUDE |
---|
[2657] | 51 | ) |
---|