[Qt] Make it possible to build WebKit without QtWidgets
[WebKit-https.git] / Source / WebKit / WebKit1.pro
1 # -------------------------------------------------------------------
2 # Target file for the WebKit1 static library
3 #
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
6
7 TEMPLATE = lib
8 TARGET = WebKit1
9
10 load(features)
11
12 include(WebKit1.pri)
13
14 WEBKIT += wtf javascriptcore webcore
15 QT += gui widgets
16
17 CONFIG += staticlib
18
19 SOURCES += \
20     $$PWD/qt/Api/qwebframe.cpp \
21     $$PWD/qt/Api/qgraphicswebview.cpp \
22     $$PWD/qt/Api/qwebpage.cpp \
23     $$PWD/qt/Api/qwebview.cpp \
24     $$PWD/qt/Api/qwebelement.cpp \
25     $$PWD/qt/Api/qwebhistory.cpp \
26     $$PWD/qt/Api/qwebsettings.cpp \
27     $$PWD/qt/Api/qwebhistoryinterface.cpp \
28     $$PWD/qt/Api/qwebplugindatabase.cpp \
29     $$PWD/qt/Api/qwebpluginfactory.cpp \
30     $$PWD/qt/Api/qwebsecurityorigin.cpp \
31     $$PWD/qt/Api/qwebscriptworld.cpp \
32     $$PWD/qt/Api/qwebdatabase.cpp \
33     $$PWD/qt/Api/qwebinspector.cpp \
34     $$PWD/qt/Api/qwebkitversion.cpp \
35     $$PWD/qt/Api/qhttpheader.cpp \
36     $$PWD/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
37     $$PWD/qt/WebCoreSupport/QtWebComboBox.cpp \
38     $$PWD/qt/WebCoreSupport/ChromeClientQt.cpp \
39     $$PWD/qt/WebCoreSupport/ContextMenuClientQt.cpp \
40     $$PWD/qt/WebCoreSupport/DragClientQt.cpp \
41     $$PWD/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
42     $$PWD/qt/WebCoreSupport/EditorClientQt.cpp \
43     $$PWD/qt/WebCoreSupport/UndoStepQt.cpp \
44     $$PWD/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
45     $$PWD/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
46     $$PWD/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
47     $$PWD/qt/WebCoreSupport/InitWebCoreQt.cpp \
48     $$PWD/qt/WebCoreSupport/InspectorClientQt.cpp \
49     $$PWD/qt/WebCoreSupport/InspectorServerQt.cpp \
50     $$PWD/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \
51     $$PWD/qt/WebCoreSupport/PageClientQt.cpp \
52     $$PWD/qt/WebCoreSupport/PopupMenuQt.cpp \
53     $$PWD/qt/WebCoreSupport/QtPlatformPlugin.cpp \
54     $$PWD/qt/WebCoreSupport/RenderThemeQStyle.cpp \
55     $$PWD/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp \
56     $$PWD/qt/WebCoreSupport/SearchPopupMenuQt.cpp \
57     $$PWD/qt/WebCoreSupport/TextCheckerClientQt.cpp \
58     $$PWD/qt/WebCoreSupport/PlatformStrategiesQt.cpp \
59     $$PWD/qt/WebCoreSupport/WebEventConversion.cpp
60
61 HEADERS += \
62     $$PWD/qt/Api/qwebframe.h \
63     $$PWD/qt/Api/qwebframe_p.h \
64     $$PWD/qt/Api/qgraphicswebview.h \
65     $$PWD/qt/Api/qwebkitglobal.h \
66     $$PWD/qt/Api/qwebkitplatformplugin.h \
67     $$PWD/qt/Api/qwebpage.h \
68     $$PWD/qt/Api/qwebview.h \
69     $$PWD/qt/Api/qwebsettings.h \
70     $$PWD/qt/Api/qwebhistoryinterface.h \
71     $$PWD/qt/Api/qwebdatabase.h \
72     $$PWD/qt/Api/qwebsecurityorigin.h \
73     $$PWD/qt/Api/qwebelement.h \
74     $$PWD/qt/Api/qwebelement_p.h \
75     $$PWD/qt/Api/qwebpluginfactory.h \
76     $$PWD/qt/Api/qwebhistory.h \
77     $$PWD/qt/Api/qwebinspector.h \
78     $$PWD/qt/Api/qwebkitversion.h \
79     $$PWD/qt/Api/qwebplugindatabase_p.h \
80     $$PWD/qt/Api/qhttpheader_p.h \
81     $$PWD/qt/WebCoreSupport/InitWebCoreQt.h \
82     $$PWD/qt/WebCoreSupport/InspectorServerQt.h \
83     $$PWD/qt/WebCoreSupport/QtFallbackWebPopup.h \
84     $$PWD/qt/WebCoreSupport/QtWebComboBox.h \
85     $$PWD/qt/WebCoreSupport/FrameLoaderClientQt.h \
86     $$PWD/qt/WebCoreSupport/FrameNetworkingContextQt.h \
87     $$PWD/qt/WebCoreSupport/GeolocationPermissionClientQt.h \
88     $$PWD/qt/WebCoreSupport/NotificationPresenterClientQt.h \
89     $$PWD/qt/WebCoreSupport/PageClientQt.h \
90     $$PWD/qt/WebCoreSupport/PopupMenuQt.h \
91     $$PWD/qt/WebCoreSupport/QtPlatformPlugin.h \
92     $$PWD/qt/WebCoreSupport/RenderThemeQStyle.h \
93     $$PWD/qt/WebCoreSupport/ScrollbarThemeQStyle.h \
94     $$PWD/qt/WebCoreSupport/SearchPopupMenuQt.h \
95     $$PWD/qt/WebCoreSupport/TextCheckerClientQt.h \
96     $$PWD/qt/WebCoreSupport/PlatformStrategiesQt.h \
97     $$PWD/qt/WebCoreSupport/WebEventConversion.h
98
99 INCLUDEPATH += \
100     $$PWD/qt/Api \
101     $$PWD/qt/WebCoreSupport
102
103 contains(DEFINES, ENABLE_VIDEO=1) {
104     !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
105         HEADERS += $$PWD/qt/WebCoreSupport/FullScreenVideoWidget.h
106         SOURCES += $$PWD/qt/WebCoreSupport/FullScreenVideoWidget.cpp
107     }
108
109     contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
110         HEADERS += $$PWD/qt/WebCoreSupport/FullScreenVideoQt.h
111         SOURCES += $$PWD/qt/WebCoreSupport/FullScreenVideoQt.cpp
112     }
113
114     contains(DEFINES, WTF_USE_QTKIT=1) {
115         INCLUDEPATH += \
116             $$PWD/../WebCore/platform/qt/ \
117             $$PWD/../WebCore/platform/mac/ \
118             $$PWD/../../WebKitLibraries/
119
120         DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
121
122         contains(CONFIG, "x86") {
123             DEFINES+=NS_BUILD_32_LIKE_64
124         }
125
126         HEADERS += \
127             $$PWD/qt/WebCoreSupport/WebSystemInterface.h \
128             $$PWD/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h
129
130         OBJECTIVE_SOURCES += \
131             $$PWD/qt/WebCoreSupport/WebSystemInterface.mm \
132             $$PWD/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm
133     }
134 }
135
136 contains(DEFINES, ENABLE_ICONDATABASE=1) {
137     HEADERS += \
138         $$PWD/../WebCore/loader/icon/IconDatabaseClient.h \
139         $$PWD/qt/WebCoreSupport/IconDatabaseClientQt.h
140
141     SOURCES += \
142         $$PWD/qt/WebCoreSupport/IconDatabaseClientQt.cpp
143 }
144
145 contains(DEFINES, ENABLE_GEOLOCATION=1) {
146      HEADERS += \
147         $$PWD/qt/WebCoreSupport/GeolocationClientQt.h
148      SOURCES += \
149         $$PWD/qt/WebCoreSupport/GeolocationClientQt.cpp
150 }
151
152