Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem3/bin/CMakeLists.txt @ 2685

Last change on this file since 2685 was 2685, checked in by rgrieder, 15 years ago

Fixed install target:

  • log and config file go a to separate folder each
  • The SignalHandler crash log is now "orxonox_crash.log" to avoid opening the file twice which might result in problems
  • moved tcl scripts to media/tcl8.#/ as a temporary solution. I've also created a ticket to fix this.
  • UPDATE YOUR MEDIA REPOSITORY
  • orxonox.log pre-main gets written to either %TEMP% (windows) or /tmp (Unix) and when the path was set, the content is copied.
  • removed Settings class and moved media path to Core
  • media, log and config path are now all in Core where only the media path can be configured via ini file or command line
  • Core::isDevBuild() tells whether we are running in the build or the installation directory (determined by the presence of "orxonox_dev_build.kepp_me" in the binary dir)
  • renamed Settings::getDataPath to Core::getMediaPath
  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
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 #    Creates a run-script in the root directory of the build tree.
24 #
25
26############ Configure Dev Build ##############
27
28
29################ Run Scripts ##################
30
31# Create a run script for Windows to manually add the DLL path when executing
32IF(WIN32)
33  SET(RUN_SCRIPT run.bat)
34ELSEIF(UNIX)
35  SET(RUN_SCRIPT run)
36ENDIF()
37
38IF(NOT CMAKE_CONFIGURATION_TYPES)
39  SET(_subdirs .)
40  SEt(_default_subdir .)
41ELSE()
42  SET(_subdirs ${CMAKE_CONFIGURATION_TYPES})
43  SEt(_default_subdir Debug)
44ENDIF()
45STRING(REPLACE "/" "\\" ORXONOX_RUNTIME_LIBRARY_DIRECTORY_WINDOWS ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY})
46FOREACH(_subdir ${_subdirs})
47  GET_FILENAME_COMPONENT(CURRENT_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_subdir} ABSOLUTE)
48
49  # Note: Do not use FILE(TO_NATIVE_PATH) because it doesn't work for MinGW
50  STRING(REGEX REPLACE "^([A-Z]\\:)\\/.*$" "\\1" WINDOWS_DRIVE_CHANGE ${CURRENT_RUNTIME_DIR})
51  STRING(REPLACE "/" "\\" CURRENT_RUNTIME_DIR_WINDOWS ${CURRENT_RUNTIME_DIR})
52
53  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT}.in ${CURRENT_RUNTIME_DIR}/${RUN_SCRIPT} @ONLY)
54  IF(_subdir STREQUAL _default_subdir)
55    # Convenience script to be used when sitting in the binary directory. Defaults to Debug for msvc.
56    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${RUN_SCRIPT}.in ${CMAKE_BINARY_DIR}/${RUN_SCRIPT} @ONLY)
57  ENDIF()
58
59  # In order to evaluate at run time whether it is a dev build in the build tree,
60  # we plant a special file
61  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/orxonox_dev_build.keep_me ${CURRENT_RUNTIME_DIR}/orxonox_dev_build.keep_me)
62ENDFOREACH(_subdir)
Note: See TracBrowser for help on using the repository browser.