Currently V8 is built right into the QtDeclarative library. It should instead be built as a shared library so that it can be used in other places of Qt (including QtCore, if appropriate). Turning it into a Qt library also makes it easy to arrange for the V8 headers to be installed, so that e.g. applications that use QtDeclarative private headers – which need v8.h – will build.
To make V8 available, a library/application would add
QT += v8-private
to its .pro file. To use the V8 API, add
to C++/header files.
The API would be private in Qt because we're exposing the V8 API directly, and we cannot make source/binary compatibility guarantees on behalf of a third-party library.