[Orxonox-commit 5] r2720 - in trunk: . cmake

rgrieder at orxonox.net rgrieder at orxonox.net
Sun Mar 1 17:15:12 CET 2009


Author: rgrieder
Date: 2009-03-01 17:15:12 +0100 (Sun, 01 Mar 2009)
New Revision: 2720

Added:
   trunk/cmake/Media.cmake
Removed:
   trunk/media/
Modified:
   trunk/CMakeLists.txt
Log:
Moved media/CMakeLists.txt to cmake/Media.cmake to allow media checkout in media/

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2009-03-01 16:13:56 UTC (rev 2719)
+++ trunk/CMakeLists.txt	2009-03-01 16:15:12 UTC (rev 2720)
@@ -51,7 +51,7 @@
 INCLUDE(BuildConfig)
 
 # Configure media directory location and installation
-ADD_SUBDIRECTORY(media)
+INCLUDE(Media)
 
 # Remaining tardis hack
 ADD_SUBDIRECTORY(config)

Copied: trunk/cmake/Media.cmake (from rev 2714, trunk/media/CMakeLists.txt)
===================================================================
--- trunk/cmake/Media.cmake	                        (rev 0)
+++ trunk/cmake/Media.cmake	2009-03-01 16:15:12 UTC (rev 2720)
@@ -0,0 +1,58 @@
+ #
+ #             ORXONOX - the hottest 3D action shooter ever to exist
+ #                             > www.orxonox.net <
+ #
+ #        This program is free software; you can redistribute it and/or
+ #         modify it under the terms of the GNU General Public License
+ #        as published by the Free Software Foundation; either version 2
+ #            of the License, or (at your option) any later version.
+ #
+ #       This program is distributed in the hope that it will be useful,
+ #        but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #                 GNU General Public License for more details.
+ #
+ #   You should have received a copy of the GNU General Public License along
+ #      with this program; if not, write to the Free Software Foundation,
+ #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #
+ #
+ #  Author:
+ #    Reto Grieder
+ #  Description:
+ #    Finds the media directory and configures it's installation.
+ #
+
+# Specify media directory
+GET_FILENAME_COMPONENT(_search_path_1 ${CMAKE_SOURCE_DIR}/../${DEFAULT_MEDIA_PATH} ABSOLUTE)
+FIND_PATH(MEDIA_PATH resources.cfg
+  PATHS
+    ${CMAKE_SOURCE_DIR}/${DEFAULT_MEDIA_PATH}
+    ${_search_path_1}
+  NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
+)
+
+# For consistency with other variables for config, log, bin, etc.
+SET(CMAKE_MEDIA_OUTPUT_DIRECTORY MEDIA_PATH)
+
+IF(NOT CMAKE_MEDIA_OUTPUT_DIRECTORY)
+  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")
+  # Temporary override to the default location.
+  SET(CMAKE_MEDIA_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/media)
+ENDIF()
+
+
+################ Installation #################
+
+# Try no to copy both tcl script file libraries
+IF(TCL_LIBRARY MATCHES "85|8\\.5")
+  SET(TCL_EXCLUDE_PATTERN "tcl8\\.4")
+ELSEIF(TCL_LIBRARY MATCHES "84|8\\.4")
+  SET(TCL_EXCLUDE_PATTERN "tcl8\\.5")
+ENDIF()
+
+INSTALL(
+  DIRECTORY ${CMAKE_MEDIA_OUTPUT_DIRECTORY}/
+  DESTINATION ${ORXONOX_MEDIA_INSTALL_PATH}
+  REGEX "\\.svn$|_svn$|backToPNG|${TCL_EXCLUDE_PATTERN}" EXCLUDE
+)




More information about the Orxonox-commit mailing list