Skip to content
Fabien JUIF edited this page Dec 15, 2018 · 8 revisions

🚧🚧🚧🚧🚧I still need time to finish it (@fabienjuif) 🚧🚧🚧🚧🚧

Prerequisites

  • git: brew install git
  • cmake: brew install cmake

Running examples

In this page we don't install libraries to the system (we are not calling sudo make install).

Fetching dependencies

## create your project name
mkdir my-project
cd my-project

## create a vendors directory containing dependencies
mkdir vendors
cd vendors
## rust-sfml
git clone https://github.com/jeremyletang/rust-sfml.git
## CSFML
git clone https://github.com/SFML/CSFML.git
cd CSFML
### - latest stable release
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
cd ..
## SFML
git clone https://github.com/SFML/SFML.git
### - latest stable release
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
cd ..

Building dependencies

## SFML
cd SFML
cmake .
make all
cd ..

## Tell CSFML where to find SFML
export SFML_DIR="$(pwd -P)/../SFML"

## CSFML
cd CSFML
cmake -DCMAKE_MODULE_PATH="$SFML_DIR/cmake" .
make all
cd ..

Launch pong example

cd rust-sfml

## telling where to find dependencies libs
export LIBRARY_PATH=$(pwd)/../SFML/lib:$(pwd)/../CSFML/lib

## runing pong example
cargo run --example pong
Clone this wiki locally