Difference between revisions of "Compiling using CMake"
m (→Windows) |
(→Linux) |
||
Line 14: | Line 14: | ||
== Linux == | == Linux == | ||
+ | |||
+ | Compiling Odamex using CMake has been tested on Debian Linux 6.0. The instructions for the other distributions have been inferred using available documentation. If you are having trouble with a specific configuration, please add a response to [http://odamex.net/bugs/show_bug.cgi?id=284 this bug]. | ||
+ | |||
+ | === Installing CMake === | ||
+ | |||
+ | Depending on your Linux distribution, you may or may not have a copy of CMake in your software repository. Even if you do, the version that is available might not be up-to-date. The following distributions have a version of CMake 2.8, which is what the current build script requires. | ||
+ | |||
+ | * Debian 6.0: '''CMake 2.8.2''' aptitude install cmake | ||
+ | * Fedora 15: '''CMake 2.8.4''' yum install cmake | ||
+ | * openSUSE 11.4: '''CMake 2.8.3''' zypper in cmake | ||
+ | * Slackware 13.37 '''CMake 2.8.4''' pkgtool | ||
+ | * Ubuntu 10.04 LTS: '''CMake 2.8.0''' apt-get install cmake | ||
+ | * Ubuntu 11.04: '''CMake 2.8.3''' apt-get install cmake | ||
+ | |||
+ | The following distributions have an out-of-date version of CMake. You are welcome to bypass the version check and see if it still works. Assuming that there isn't too much breakage and workarounds needed to support it, "official" support for CMake 2.6 will be considered. | ||
+ | |||
+ | * CentOS 5.x: '''CMake 2.6.4 (through [http://fedoraproject.org/wiki/EPEL EPEL])''' yum install cmake | ||
+ | * Debian 5.0: '''CMake 2.6.0''' aptitude install cmake | ||
+ | * Red Hat Enterprise Linux 5.x: '''CMake 2.6.4 (through [http://fedoraproject.org/wiki/EPEL EPEL])''' yum install cmake | ||
+ | * Scientific Linux 5.x: '''CMake 2.6.4 (through [http://fedoraproject.org/wiki/EPEL EPEL])''' yum install cmake | ||
+ | |||
+ | If you do not have an up-to-date CMake, or would prefer to use the absolute latest version, both binary and source tarballs can be downloaded [http://www.cmake.org/cmake/resources/software.html here]. |
Revision as of 23:49, 9 July 2011
According to the Wikipedia page, CMake is a unified, cross-platform, open-source build system that enables developers to build, test and package software by specifying build parameters in simple, portable text files. It works in a compiler-independent manner and the build process works in conjunction with native build environments, such as make, Apple's Xcode and Microsoft Visual Studio. It also has minimal dependencies, C++ only. CMake is open source software and is developed by Kitware.
CMake can:
- Create libraries
- Generate wrappers
- Compile source code
- Build executables in arbitrary combinations
Since the CMake build files are not in Odamex's source tree yet, you can grab a patch file that can be applied against the base directory of an SVN checkout link here. The correct patch is by Alexander Mayfield, the one by Albert Brown has not been updated since 2007.
Windows
The latest version of CMake can be downloaded from Kitware's website here.
Linux
Compiling Odamex using CMake has been tested on Debian Linux 6.0. The instructions for the other distributions have been inferred using available documentation. If you are having trouble with a specific configuration, please add a response to this bug.
Installing CMake
Depending on your Linux distribution, you may or may not have a copy of CMake in your software repository. Even if you do, the version that is available might not be up-to-date. The following distributions have a version of CMake 2.8, which is what the current build script requires.
- Debian 6.0: CMake 2.8.2 aptitude install cmake
- Fedora 15: CMake 2.8.4 yum install cmake
- openSUSE 11.4: CMake 2.8.3 zypper in cmake
- Slackware 13.37 CMake 2.8.4 pkgtool
- Ubuntu 10.04 LTS: CMake 2.8.0 apt-get install cmake
- Ubuntu 11.04: CMake 2.8.3 apt-get install cmake
The following distributions have an out-of-date version of CMake. You are welcome to bypass the version check and see if it still works. Assuming that there isn't too much breakage and workarounds needed to support it, "official" support for CMake 2.6 will be considered.
- CentOS 5.x: CMake 2.6.4 (through EPEL) yum install cmake
- Debian 5.0: CMake 2.6.0 aptitude install cmake
- Red Hat Enterprise Linux 5.x: CMake 2.6.4 (through EPEL) yum install cmake
- Scientific Linux 5.x: CMake 2.6.4 (through EPEL) yum install cmake
If you do not have an up-to-date CMake, or would prefer to use the absolute latest version, both binary and source tarballs can be downloaded here.