Skip to content

Commit

Permalink
📝 Updated BUILDING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherFoxGuy committed Sep 17, 2021
1 parent c34639e commit f284489
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 58 deletions.
139 changes: 81 additions & 58 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,89 @@
Please refer to https://github.com/RigsOfRods/rigs-of-rods/wiki

# Dependencies
core requirements:
### Core requirements:
* C/C++ compiler with support for C++11 (e.g. gcc >= 4.8)
* boost: >= 1.50
* cmake: >= 2.8
* curl
* libssl
* libgtk 2.0
* mygui: >= 3.2.2
* ogre: 1.8.x or 1.9.x
* OIS: 1.3
* openal-soft (any version should work, crashes with 1.15.x)
* RapidJSON >= 1.1.0

optional but recommended:
* angelscript: 2.31.2
* required for scripting (AI, racing, server mods...)
* when building without AS this has to be removed in resources/particles/water.particle: "affector FireExtinguisher { effectiveness 1 }"
* caelum: >= 0.6.2, compatible with the OGRE version you chose
* sky plugin: provides dynamic sky with time of day, weather and clouds
* mysocketw: latest from git
* required for network play
* cmake: >= 3.16

### Required dependencies

* OGRE: 1.11.6.1
* OpenAL: >= 1.18
* OIS: >= 1.4
* MyGUI: 3.4.0
* fmt: >= 6
* RapidJSON: >= 1.1

### Optional dependencies

* SocketW: >= 3.10
* AngelScript: 2.32.0
* CURL: >= 7.6
* Caelum: 0.6.4
* PagedGeometry: 1.2.1
* discord_rpc: 3.4.0
* OpenSSL: >= 1.1.1

**Notes:**
* AngelScript
* Required for scripting (AI, racing, server mods...)
* When building without AS this has to be removed in resources/particles/water.particle:
`affector FireExtinguisher { effectiveness 1 }`
* Caelum
* Sky plugin: provides dynamic sky with time of day, weather and clouds
* SocketW
* Required for network play
* nvidia-cg-toolkit
* required for Cg shader effects which some mods use
* Required for Cg shader effects which some mods use
* Not libre software
* Requires Ogre to be compiled by hand
* paged geometry: latest from git
* required to display vegetation
* PagedGeometry
* Required to display vegetation
* discord_rpc
* Used to display the "Now Playing" section in a Discord user's profile


## CMake options
##### Rigs of Rods core:
| option | effect |
|--------------------------------|------------------------------------------------------|
| CMAKE_BUILD_TYPE:STRING | Build Type (DEBUG, RELEASE, RelWithDebInfo) |
| ROR_BUILD_CONFIGURATOR:BOOL | Build RoRConfig |
| ROR_USE_ANGELSCRIPT:BOOL | Build with Angelscript support |
| ROR_USE_CAELUM:BOOL | Build with OGRE:Caelum sky plugin |
| ROR_USE_CURL:BOOL | Build with curl for online services |
| ROR_USE_SOCKETW:BOOL | Build with SocketW for cross-platform socket support |
| ROR_USE_OPENAL:BOOL | Build with OpenAL for sound |
| ROR_USE_PAGED:BOOL | Build with OGRE:Paged Geometry for vegetation |

##### Library specific:
| option | effect |
|--------------------------------|------------------------------------------------------|
| CMAKE_CXX_COMPILER:FILEPATH | Path to C++ compiler |
| ANGELSCRIPT_INCLUDE_DIRS:PATH | Path to AngelScript header files |
| ANGELSCRIPT_LIBRARIES:FILEPATH | Path to AngelScript library |
| Boost_INCLUDE_DIR:PATH | Path to Boost header files |
| Boost_LIBRARY_DIR:PATH | Path to Boost library |
| CAELUM_INCLUDE_DIRS:PATH | Path to Caelum header files |
| CAELUM_LIBRARIES:FILEPATH | Path to Caelum library |
| CURL_INCLUDE_DIR:PATH | Path to curl header files |
| CURL_LIBRARY:FILEPATH | Path to curl library |
| MYGUI_INCLUDE_DIRS:PATH | Path to MyGUI header files |
| MYGUI_OGRE_PLATFORM:FILEPATH | Path to MyGUI library |
| OPENAL_INCLUDE_DIR:PATH | Path to OpenAL header files |
| OPENAL_LIBRARY:FILEPATH | Path to OpenAL library |
| PAGED_INCLUDE_DIRS:PATH | Path to Paged Geometry header files |
| PAGED_LIBRARIES:FILEPATH | Path to Paged Geometry library |
| SOCKETW_INCLUDE_DIRS:PATH | Path to SocketW header files |
| SOCKETW_LIBRARIES:FILEPATH | Path to SocketW library |

For additional information refer to CMakeCache.txt after CMake has been configured at least once.

### Core options

The Rigs of Rods build system allows to have on-demand fallback on Conan.
This means that if your (Linux) distribution doesn't ship a compatible version of a dependency you can use conan to install the missing dependency without having to install everything with conan.

`ROR_FORCE_SYSTEM_DEPENDENCIES`
Values: `[ON, OFF]`

* If this has been set to ON cmake will throw an error instead of falling pack to conan.

`ROR_LIB_PREFERENCE`
Values: `[SYSTEM, CONAN]`

* This will set the preferred method of obtaining dependencies.
See the explanation below for meaning the values.

`ROR_DEPENDENCY_DIR`

This is used to set the path to the folder built by https://github.com/RigsOfRods/ror-dependencies

#### **Explanation of the dependencies options values**

* `SYSTEM` This means that cmake will first search for the dependency on the system, if it can't find it will add it to the list of conan packages to install.
* `CONAN` This means that cmake will add the dependency to the list of conan packages to install.
* `OFF` This means that the dependency will not be searched for nor be installed with conan.

### Dependencies options

| Name | Values |
|------|--------|
| `ROR_USE_OGRE` | `SYSTEM`, `CONAN` |
| `ROR_USE_OPENAL` | `SYSTEM`, `CONAN` |
| `ROR_USE_OIS` | `SYSTEM`, `CONAN` |
| `ROR_USE_MYGUI` | `SYSTEM`, `CONAN` |
| `ROR_USE_SOCKETW` | `SYSTEM`, `CONAN`, `OFF` |
| `ROR_USE_ANGELSCRIPT` | `SYSTEM`, `CONAN`, `OFF` |
| `ROR_USE_CURL` | `SYSTEM`, `CONAN`, `OFF` |
| `ROR_USE_CAELUM` | `SYSTEM`, `CONAN`, `OFF` |
| `ROR_USE_PAGEDGEOMETRY` | `SYSTEM`, `CONAN`, `OFF` |
| `ROR_USE_FMT` | `SYSTEM`, `CONAN` |
| `ROR_USE_DISCORD_RPC` | `SYSTEM`, `CONAN`, `OFF` |
| `ROR_USE_RAPIDJSON` | `SYSTEM`, `CONAN` |
| `ROR_USE_OPENSSL` | `SYSTEM`, `CONAN`, `OFF` |
3 changes: 3 additions & 0 deletions cmake/DependenciesConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_external_lib(
add_external_lib(
OpenAL
openal/1.19.1
REQUIRED
PKG_CONFIG "openal >= 1.18"
FIND_PACKAGE_OPTIONS CONFIG
)
Expand Down Expand Up @@ -77,6 +78,7 @@ add_external_lib(
add_external_lib(
fmt
fmt/8.0.1
REQUIRED
PKG_CONFIG "fmt >= 6"
FIND_PACKAGE_OPTIONS CONFIG
)
Expand All @@ -91,6 +93,7 @@ add_external_lib(
add_external_lib(
RapidJSON
rapidjson/cci.20200410
REQUIRED
PKG_CONFIG "RapidJSON >= 1.1"
FIND_PACKAGE_OPTIONS CONFIG
)
Expand Down

0 comments on commit f284489

Please # to comment.