You can a system wide install, with:
qmake
make
sudo make install
Or, if you would like to build the plugin statically into your project, then you put a copy under your own project (say, /qml-box2d), add the necessary includes and registration calls to your sources and build files.
Add somewhere in your .pro file:
Code:
include(qml-box2d/box2d-static.pri)
And in your main.cpp includes, add:
Code:
#include <box2dplugin.h>
And before using the qmldeclarativeview, register box2d plugin
Code:
Box2DPlugin box2dplugin;
box2dplugin.registerTypes("Box2D");