CMakeLists.txt:
# 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})
Then call cmake with
mkdir build && cd build cmake ..
You may also need to pass an argument to cmake if it can't find PolyVox. Pass -DCMAKE_PREFIX_PATH=/path/to/polyvox/root/
.