From e92afa23e2848c2f0b28dab527aad18e4255bb1d Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Fri, 5 Mar 2010 16:43:20 +0000 Subject: [PATCH] Add some basic CMake info to the doxygen docs. --- library/Mainpage.dox | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/library/Mainpage.dox b/library/Mainpage.dox index 47e67028..b7a0243b 100644 --- a/library/Mainpage.dox +++ b/library/Mainpage.dox @@ -5,6 +5,8 @@ The PolyVox documentation.\n For a brief introduction, see the \ref tutorial. +To see how to use CMake with %PolyVox, see \ref cmake. + \author David Williams @@ -15,7 +17,9 @@ For a brief introduction, see the \ref tutorial. /** \page tutorial Tutorial -This is a basic tutorial covering the essentials of using PolyVox. +This is a basic tutorial covering the essentials of using %PolyVox. + +\note This is a work in progress. For now, the best example is the OpenGL example distributed with %PolyVox in the example/OpenGL/ folder. \code #include @@ -26,3 +30,32 @@ int main(int argc, char *argv[]) } \endcode */ + +/** +\page cmake Finding %PolyVox with CMake + +CMakeLists.txt: +\verbatim +# Tell CMake the name of you project +project(MyApp) + +# Ask CMake to find PolyVox for you +find_package(PolyVox REQUIRED) + +# Tell your compiler where to look for the PolyVox headers +include_directories(${PolyVox_INCLUDE_DIRS}) + +# Create your executable +add_executable(myapp main.cpp) + +# Link it to PolyVox +target_link_libraries(myapp ${PolyVox_LIBRARIES}) +\endverbatim + +Then call cmake with +\verbatim +mkdir build && cd build +cmake .. +\endverbatim +You may also need to pass an argument to cmake if it can't find %PolyVox. Pass -DCMAKE_PREFIX_PATH=/path/to/polyvox/root/. +*/