Sunday, 28 September 2008

How to build Qt WebKit trunk as a static library

Add the following to WebKit.pri:-
CONFIG += staticlib

Run WebKitTools/Scripts/build-webkit --qt --release

Copy WebKitBuild/Release/JavaScriptCore/libJavaScriptCore.a to WebKitBuild/Release/lib/libJavaScriptCore.a

Remove WebKitBuild/Release/lib/libQtWebKit.so*

Use the following qmake config:-
WEBKITDIR = $$(WEBKITDIR)
CONFIG(release):WEBKITBUILD = $$WEBKITDIR/WebKitBuild/Release/lib
CONFIG(debug):WEBKITBUILD = $$WEBKITDIR/WebKitBuild/Debug/lib
message(Using WebKit Trunk at $$WEBKITDIR)
message(Using WebKit Build at $$WEBKITBUILD)
QT -= webkit
DEFINES += WEBKIT_TRUNK
QMAKE_LIBDIR_FLAGS = -L$$WEBKITBUILD
LIBS = -lQtWebKit
INCLUDEPATH = $$WEBKITDIR/WebKit/qt/Api $$INCLUDEPATH
QMAKE_RPATHDIR = $$WEBKITBUILD $$QMAKE_RPATHDIR

No comments:

Post a Comment

Followers