From 0cf6a533c73dce17a46368bfd03cb74bb26c7050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neun=C3=BCller?= Date: Thu, 25 Jul 2013 14:41:27 +0200 Subject: [PATCH] README: Improve Building section. --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e0fb334..55097b4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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: @@ -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 `/share/cmake-2.8/Modules`, where `` is the installation directory on Windows (usually `C:\Program Files (x86)\CMake 2.8`) and usually simply `/usr` on Linux. -- Specify the directories where the files are located +* 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=` 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.