2007-11-21 Eric Seidel <eric@webkit.org>
[WebKit-https.git] / WebKit.pri
1 # Include file to make it easy to include WebKit into Qt projects
2
3
4 isEmpty(OUTPUT_DIR) {
5     CONFIG(release):OUTPUT_DIR=$$PWD/WebKitBuild/Release
6     CONFIG(debug):OUTPUT_DIR=$$PWD/WebKitBuild/Debug
7 }
8
9 !gtk-port:CONFIG += qt-port
10 qt-port:DEFINES += BUILDING_QT__=1
11 qt-port:!building-libs {
12     QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
13     LIBS += -lQtWebKit
14     DEPENDPATH += $$PWD/WebKit/qt/Api
15 }
16
17 gtk-port {
18     CONFIG += link_pkgconfig
19
20     DEFINES += BUILDING_CAIRO__=1 BUILDING_GTK__=1
21
22     # We use FreeType directly with Cairo
23     PKGCONFIG += cairo-ft
24
25     directfb: PKGCONFIG += cairo-directfb gtk+-directfb-2.0
26     else: PKGCONFIG += cairo gtk+-2.0
27
28     # We use the curl http backend on all platforms
29     PKGCONFIG += libcurl
30
31     LIBS += -lWebKitGtk -ljpeg -lpng
32
33     QMAKE_CXXFLAGS += $$system(icu-config --cppflags)
34     QMAKE_LIBS += $$system(icu-config --ldflags)
35
36     # This set of warnings is borrowed from the Mac build
37     QMAKE_CXXFLAGS += -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wundef
38 }
39
40 DEFINES += USE_SYSTEM_MALLOC
41 CONFIG(release) {
42     DEFINES += NDEBUG
43 }
44
45 BASE_DIR = $$PWD
46 qt-port:INCLUDEPATH += \
47     $$PWD/WebKit/qt/Api
48 gtk-port:INCLUDEPATH += \
49     $$BASE_DIR/WebCore/platform/gtk \
50     $$BASE_DIR/WebCore/platform/network/curl \
51     $$BASE_DIR/WebCore/platform/graphics/cairo \
52     $$BASE_DIR/WebCore/loader/gtk \
53     $$BASE_DIR/WebCore/page/gtk \
54     $$BASE_DIR/WebKit/gtk/Api \
55     $$BASE_DIR/WebKit/gtk/WebCoreSupport
56 INCLUDEPATH += \
57     $$BASE_DIR/JavaScriptCore/ \
58     $$BASE_DIR/JavaScriptCore/kjs \
59     $$BASE_DIR/JavaScriptCore/bindings \
60     $$BASE_DIR/JavaScriptCore/bindings/c \
61     $$BASE_DIR/JavaScriptCore/wtf \
62     $$BASE_DIR/JavaScriptCore/ForwardingHeaders \
63     $$BASE_DIR/WebCore \
64     $$BASE_DIR/WebCore/ForwardingHeaders \
65     $$BASE_DIR/WebCore/platform \
66     $$BASE_DIR/WebCore/platform/network \
67     $$BASE_DIR/WebCore/platform/graphics \
68     $$BASE_DIR/WebCore/loader \
69     $$BASE_DIR/WebCore/page \
70     $$BASE_DIR/WebCore/css \
71     $$BASE_DIR/WebCore/dom \
72     $$BASE_DIR/WebCore/bridge \
73     $$BASE_DIR/WebCore/editing \
74     $$BASE_DIR/WebCore/rendering \
75     $$BASE_DIR/WebCore/history \
76     $$BASE_DIR/WebCore/xml \
77     $$BASE_DIR/WebCore/html
78
79
80 macx {
81         INCLUDEPATH += /usr/include/libxml2
82         LIBS += -lxml2 -lxslt
83 }