Skip to content

Commit ef549af

Browse files
committed
add cmake_prefix and DIR reminder for cmake example
1 parent 455d473 commit ef549af

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/docs/docs/faq.md

+11
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,17 @@ In C++ you are also able to pre-allocate a custom number of OpenGL contexts so t
406406

407407
You need to use `waf` to build RobotDART, but when installing the library a CMake module is installed. Thus it is possible use RobotDART in your code using CMake. You can find a complete example at [cmake/example](https://github.com/resibots/robot_dart/blob/master/cmake/example). In short the CMake would look like this:
408408

409+
### Prerequisites:
410+
- Ensure `robot_dart` is installed.
411+
- If `robot_dart` and `magnum` are not installed in standard locations, you can either:
412+
- Set the `CMAKE_PREFIX_PATH` environment variable:
413+
```sh
414+
export CMAKE_PREFIX_PATH=/opt/robot_dart:/opt/magnum
415+
```
416+
- Or, specify the paths directly when running `cmake`:
417+
```sh
418+
cmake -DRobotDART_DIR=/opt/robot_dart -DMagnum_DIR=/opt/magnum ..
419+
```
409420
``` cmake
410421
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
411422
project(robot_dart_example)

0 commit comments

Comments
 (0)