From 3188c2ec3723574487d6673c78044656b2185bff Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 2 Apr 2020 21:40:55 +0200 Subject: [PATCH] docs: Add CMakeLists example --- .../UserManual/ReactPhysics3D-UserManual.tex | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/documentation/UserManual/ReactPhysics3D-UserManual.tex b/documentation/UserManual/ReactPhysics3D-UserManual.tex index 5ffbc727..f78bbb12 100644 --- a/documentation/UserManual/ReactPhysics3D-UserManual.tex +++ b/documentation/UserManual/ReactPhysics3D-UserManual.tex @@ -203,6 +203,20 @@ Then, you should be able to compile your application using the ReactPhysics3D library. \\ + Per example, a minimal cmake configuration might look something like the following: + \texttt{ + cmake_minimum_required(VERSION 3.10) \\ + project(physics) \\ + \\ + set(CMAKE_CXX_STANDARD 14) \\ + \\ + add_executable(physics main.cpp) \\ + \\ + include_directories(BEFORE PUBLIC /usr/local/include/reactphysics3d) \\ + target_link_libraries(physics /usr/local/lib/libreactphysics3d.a) \\ + } + + All the classes of the library are available in the \texttt{reactphysics3d} namespace or its shorter alias \texttt{rp3d}. Therefore, you need to include this namespace into your code with the following declaration: \\