Skip to content

Commit

Permalink
README: Improve Building section.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oberon00 committed Jul 25, 2013
1 parent 21e1f45 commit 0cf6a53
Showing 1 changed file with 41 additions and 13 deletions.
54 changes: 41 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ The only compiler throughoutly tested is **[MSVC 11][]**, but once upon a time t
source code and `CMakeLists.txt` were adjusted to also work with g++ 4.7.2.
The build system used is **[CMake][]** in a recent 2.8.x version.

[SFML]: http:/sfml-dev.org/
[Boost]: http://www.boost.org/
[Luabind]: http://www.rasterbar.com/products/luabind.html
[zlib]: http://www.zlib.net/
[PhysFS]: http://icculus.org/physfs/
[ssig]: https://github.com/Oberon00/ssig
[MSVC 11]: http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop#product-express-desktop
[CMake]: http://www.cmake.org/


### Setup ###

Especially on Windows, make sure to set any environment variables neccessary to
let CMake find the librarys are set correctly: `SFML_ROOT`, `BOOST_ROOT`,
`LUA_DIR`, `LUABIND_DIR`, `PHYSFSDIR`, `SSIG_DIR`. zlib does not look at any
Expand All @@ -48,17 +60,7 @@ to the (CMake) standard locations or add the containing directories to
`CMAKE_PREFIX_PATH`.


[SFML]: http:/sfml-dev.org/
[Boost]: http://www.boost.org/
[Luabind]: http://www.rasterbar.com/products/luabind.html
[zlib]: http://www.zlib.net/
[PhysFS]: http://icculus.org/physfs/
[ssig]: https://github.com/Oberon00/ssig
[MSVC 11]: http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop#product-express-desktop
[CMake]: http://www.cmake.org/


### `Find*.cmake` ###
#### `Find*.cmake` ####
The `CMakeLists.txt` for jd call `find_package()` with some libraries where
the corresponding `Find*.cmake` is not built in:

Expand All @@ -68,16 +70,42 @@ the corresponding `Find*.cmake` is not built in:

To make CMake find them you have two options:

- Copy the files to your CMake installation's module directory. This is the
* Copy the files to your CMake installation's module directory. This is the
directory where e.g. the `AddFileDependencies.cmake` module is located. It
usually lies in `<prefix>/share/cmake-2.8/Modules`, where `<prefix>` is the
installation directory on Windows (usually
`C:\Program Files (x86)\CMake 2.8`) and usually simply `/usr` on Linux.
- <a name=setcmakevar></a>Specify the directories where the files are located
* <a name=setcmakevar></a>Specify the directories where the files are located
as a semicolon `;` separated list in the `CMAKE_MODULE_PATH` CMake cache
variable: *Add entry*, type string in the Windows GUI;
or `-DCMAKE_MODULE_PATH=<path-list>` on the command line.

### Actual build ###

What's left to do is a standard CMake build. The following contains nothing
special, so if you are familiar with CMake, you can just skip the rest.

#### Unix-like ####

Navigate to the Jade root directory (with the jd and base.jd subfolders) in
your shell, then execute the following commands.

mkdir build # Name basically arbitrary, but build is already in .gitignore
cd build #
cmake .. # You may need to add the module path modifications here.
make
sudo make install # Optional.

#### Visual Studio ####

Use the Visual Studio command prompt as your shell and do as in Unix, with the
following modifications: You may need to add `-G "Visual Studio 11"` to the
cmake command line. Then use `msbuild ALL_BUILD.vcxproj` instead of `make` and
`msbuild INSTALL.vcxproj` instead of `sudo make install` if you want to
install the Jade Engine. As in Unix, you will need administrative rights for
that, but because Windows has no `sudo` equivalent, you may need to e.g.
launch a new VS command prompt as administrator.


> Jade Engine -- Copyright (c) Christian Neumüller 2012--2013
> This file is subject to the terms of the BSD 2-Clause License.
Expand Down

0 comments on commit 0cf6a53

Please sign in to comment.