Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem3/CMakeLists.txt @ 2709

Last change on this file since 2709 was 2702, checked in by rgrieder, 16 years ago

Completed work on installation:

  • The CMake switch INSTALL_COPYABLE tells whether you will be able to move the installed directory or not. If TRUE then all folders, including log and config directory, will be put into the CMAKE_INSTALL_PREFIX. Furthermore, relative paths are used, which get resolved at run time.
  • If INSTALL_COPYABLE is set to FALSE, the standard operating system directories will be used. That also means on Windows files get written to the Application Data/.orxonox folder instead of Program Files/Orxonox
  • Default configuration is INSTALL_COPYABLE=TRUE for Windows and FALSE for Unix
  • Split OrxonoxConfig.h.in in two to avoid complete recompiles when changing only a path or INSTALL_COPYABLE
  • Added a global constant character: CP_SLASH which stands for cross platform slash, meaning '/' on Unix and '
    ' on Windows
  • Core class now has methods getFooPath(), getFooPathString() and getFooPathPOSIXString() where Foo can be Media, Log or Config
  • getFooPathPOSIXString() will always return a directory formatted with slashes, even on Windows
  • getFooPath() returns a reference to the boost::filesystem::path
  • boost/filesystem.hpp does not get included to Core.h because it has a very large rat tail
  • The platform specific directory stuff gets done in Core::postMainInitialisation()
  • Adjusted all classes using the media path
  • Property svn:eol-style set to native
File size: 2.2 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 
20CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
21
22# Keep devs from using the root directory as binary directory (messes up the source tree)
23IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
24  MESSAGE(FATAL_ERROR "Please do not use the root directory as CMake output directory!
25  mkdir build; cd build; cmake ..
26  And you will have to clean the source directory by deleting CMakeCache.txt and the folder CMakeFiles")
27ENDIF()
28
29
30PROJECT(Orxonox C CXX)
31
32SET(ORXONOX_VERSION_MAJOR 0)
33SET(ORXONOX_VERSION_MINOR 0)
34SET(ORXONOX_VERSION_PATCH 3)
35SET(ORXONOX_VERSION 0.0.3)
36SET(ORXONOX_VERSION_NAME "Castor")
37
38
39# This sets where to look for modules (e.g. "Find*.cmake" files)
40SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
41
42IF(UNIX AND NOT APPLE)
43  INCLUDE(FlagUtilities)
44  SET_CACHE(CMAKE_INSTALL_PREFIX PATH "" /usr) # default: /usr/local
45ENDIF()
46
47# Library finding
48INCLUDE(LibraryConfig)
49
50# General build and compiler options and configurations
51INCLUDE(BuildConfig)
52
53# Configure media directory location and installation
54ADD_SUBDIRECTORY(media)
55
56# Remaining tardis hack
57ADD_SUBDIRECTORY(config)
58
59# Create the actual project
60ADD_SUBDIRECTORY(src)
61
62# Configure the binary output directory. Do this after src!
63ADD_SUBDIRECTORY(bin)
64
65# Last but not least: Try to make doxygen target
66ADD_SUBDIRECTORY(doc)
Note: See TracBrowser for help on using the repository browser.