Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/environment2/CMakeLists.txt @ 9998

Last change on this file since 9998 was 8351, checked in by rgrieder, 14 years ago

Merged kicklib2 branch back to trunk (includes former branches ois_update, mac_osx and kicklib).

Notes for updating

Linux:
You don't need an extra package for CEGUILua and Tolua, it's already shipped with CEGUI.
However you do need to make sure that the OgreRenderer is installed too with CEGUI 0.7 (may be a separate package).
Also, Orxonox now recognises if you install the CgProgramManager (a separate package available on newer Ubuntu on Debian systems).

Windows:
Download the new dependency packages versioned 6.0 and use these. If you have problems with that or if you don't like the in game console problem mentioned below, you can download the new 4.3 version of the packages (only available for Visual Studio 2005/2008).

Key new features:

  • *Support for Mac OS X*
  • Visual Studio 2010 support
  • Bullet library update to 2.77
  • OIS library update to 1.3
  • Support for CEGUI 0.7 —> Support for Arch Linux and even SuSE
  • Improved install target
  • Compiles now with GCC 4.6
  • Ogre Cg Shader plugin activated for Linux if available
  • And of course lots of bug fixes

There are also some regressions:

  • No support for CEGUI 0.5, Ogre 1.4 and boost 1.35 - 1.39 any more
  • In game console is not working in main menu for CEGUI 0.7
  • Tolua (just the C lib, not the application) and CEGUILua libraries are no longer in our repository. —> You will need to get these as well when compiling Orxonox
  • And of course lots of new bugs we don't yet know about
  • Property svn:eol-style set to native
File size: 5.4 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 #    Configures some basics and controls the configuration scripts
24 #
25
26# Defined LINUX
27IF(UNIX AND NOT APPLE)
28  SET(LINUX TRUE)
29ENDIF()
30
31IF(WIN32)
32  IF(MSVC10)
33    CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3 FATAL_ERROR)
34  ELSE()
35    CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
36  ENDIF()
37ELSE()
38  CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
39ENDIF()
40
41# Keep devs from using the root directory as binary directory (messes up the source tree)
42IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
43  MESSAGE(FATAL_ERROR "Please do not use the root directory as CMake output directory!
44  mkdir build; cd build; cmake ..
45  And you will have to clean the source directory by deleting CMakeCache.txt and the folder CMakeFiles")
46ENDIF()
47
48PROJECT(Orxonox C CXX)
49
50################ General Config #################
51
52# Version info
53SET(ORXONOX_VERSION_MAJOR 0)
54SET(ORXONOX_VERSION_MINOR 0)
55SET(ORXONOX_VERSION_PATCH 4)
56SET(ORXONOX_VERSION 0.0.4)
57SET(ORXONOX_VERSION_NAME "Arcturus")
58
59# Standard path suffixes
60SET(DEFAULT_RUNTIME_PATH bin)
61SET(DEFAULT_LIBRARY_PATH lib)
62SET(DEFAULT_ARCHIVE_PATH lib/static)
63SET(DEFAULT_MODULE_PATH  lib/modules)
64SET(DEFAULT_DOC_PATH     doc)
65SET(DEFAULT_DATA_PATH    data)
66SET(DEFAULT_CONFIG_PATH  config)
67SET(DEFAULT_LOG_PATH     log)
68SET(DEFAULT_BUNDLE_PATH  bundle)
69
70# Set output directories
71SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_RUNTIME_PATH})
72SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LIBRARY_PATH})
73SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_ARCHIVE_PATH})
74SET(CMAKE_MODULE_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/${DEFAULT_MODULE_PATH})
75SET(CMAKE_DOC_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_DOC_PATH})
76# Data directories are only inputs, no delclaration here
77SET(CMAKE_CONFIG_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/${DEFAULT_CONFIG_PATH})
78SET(CMAKE_LOG_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_LOG_PATH})
79
80# Set the extension of the dynamic modules
81SET(ORXONOX_MODULE_EXTENSION ".module")
82
83# Sets where to find the external libraries like OgreMain.dll at runtime
84# On Unix you should not have to change this at all.
85# This only applies to development runs in the build tree
86SET(RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
87
88# Take care of some CMake 2.6.0 leftovers
89MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
90
91# This sets where to look for CMake modules (e.g. "Find*.cmake" files)
92SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/tools)
93
94# Set Debug build to default when not having multi-config generator like msvc
95IF(NOT CMAKE_CONFIGURATION_TYPES)
96  IF(NOT CMAKE_BUILD_TYPE)
97    SET(CMAKE_BUILD_TYPE Debug CACHE STRING
98        "Build types are: Debug, Release, MinSizeRel, RelWithDebInfo" FORCE)
99  ENDIF()
100  MARK_AS_ADVANCED(CLEAR CMAKE_BUILD_TYPE)
101
102  MESSAGE(STATUS "*** Build type is ${CMAKE_BUILD_TYPE} ***")
103ELSE()
104  IF(CMAKE_BUILD_TYPE)
105    SET(CMAKE_BUILD_TYPE CACHE STRING FORCE)
106  ENDIF()
107  MARK_AS_ADVANCED(CMAKE_BUILD_TYPE)
108ENDIF()
109
110# Debug builds can not be installed
111INSTALL(SCRIPT cmake/InstallCheck.cmake)
112
113# Enable expensive optimisations: use this for a binary release build
114OPTION(ORXONOX_RELEASE "Enable when building restributable releases" FALSE)
115
116IF(APPLE)
117  # Set 10.5 as the base SDK by default
118  SET(XCODE_ATTRIBUTE_SDKROOT macosx10.5)
119
120  # 10.6 sets x86_64 as the default architecture.
121  # Because Carbon isn't supported on 64-bit and we still need it, force the architectures to ppc and i386
122  IF(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
123    SET(CMAKE_OSX_ARCHITECTURES "i386")
124  ENDIF()
125  IF(CMAKE_OSX_ARCHITECTURES MATCHES "ppc64")
126    SET(CMAKE_OSX_ARCHITECTURES "ppc")
127  ENDIF()
128  IF(NOT CMAKE_OSX_ARCHITECTURES)
129    SET(CMAKE_OSX_ARCHITECTURES "i386")
130  ENDIF()
131ENDIF()
132
133########### Subfolders and Subscripts ###########
134
135# General build and compiler options and configurations
136INCLUDE(CompilerConfig)
137
138# Library finding
139INCLUDE(LibraryConfig)
140
141# Configure installation paths and options
142INCLUDE(InstallConfig)
143
144# Configure data directory location and installation
145ADD_SUBDIRECTORY(data)
146
147# Create the actual project
148ADD_SUBDIRECTORY(src)
149
150# Configure the binary output directory. Do this after src!
151ADD_SUBDIRECTORY(bin)
152
153# System specific files (mostly for installation)
154ADD_SUBDIRECTORY(contrib)
155
156# Last but not least: Try to make a doc target with Doxygen
157ADD_SUBDIRECTORY(doc)
158
159########### CPack Packaging ###########
160
161# Currently only testing on Apple
162#IF(APPLE)
163#  INCLUDE(BundleConfig)
164#ENDIF(APPLE)
Note: See TracBrowser for help on using the repository browser.