Skip to content

Commit

Permalink
🔧 Use conan_provider for running conan
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherFoxGuy authored and ohlidalp committed Jan 8, 2025
1 parent 81c550c commit c4d229a
Show file tree
Hide file tree
Showing 14 changed files with 690 additions and 134 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-game.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ jobs:
echo "tools.system.package_manager:mode = install" > ~/.conan2/global.conf
echo "tools.system.package_manager:sudo = True" >> ~/.conan2/global.conf
conan remote add ror-conan https://git.anotherfoxguy.com/api/packages/rorbot/conan -f
conan install . -s build_type=Release -b missing -pr:b=default -c tools.cmake.cmaketoolchain:generator="Ninja"
cmake --preset conan-release -DCMAKE_INSTALL_PREFIX=redist -DCREATE_CONTENT_FOLDER=ON
cmake . -GNinja -DCMAKE_BUILD_TYPE=Release -Bbuild -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/conan_provider.cmake -DCMAKE_INSTALL_PREFIX=redist -DCREATE_CONTENT_FOLDER=ON
shell: bash

- name: Build
run: ninja install
run: |
cd build
ninja install
shell: bash

- name: Copy *.so files
Expand Down Expand Up @@ -101,17 +102,18 @@ jobs:
path: ~/.conan2

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.13.0
uses: ilammy/msvc-dev-cmd@v1

- name: Configure
run: |
conan remote add ror-conan https://git.anotherfoxguy.com/api/packages/rorbot/conan -f
conan install . -b missing -pr:b=tools/conan-profiles/vs-19-release-ninja -pr=tools/conan-profiles/vs-19-release-ninja
cmake --preset conan-release -DCMAKE_INSTALL_PREFIX=redist -DCREATE_CONTENT_FOLDER=ON
cmake . -GNinja -DCMAKE_BUILD_TYPE=Release -Bbuild -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/conan_provider.cmake -DCMAKE_INSTALL_PREFIX=redist -DCREATE_CONTENT_FOLDER=ON
shell: cmd

- name: Build
run: ninja install
run: |
cd build
ninja install
shell: cmd

- name: Upload build to itch.io
Expand Down
39 changes: 0 additions & 39 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,44 +47,5 @@ Please refer to https://github.com/RigsOfRods/rigs-of-rods/wiki

### 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` |
Loading

0 comments on commit c4d229a

Please sign in to comment.