initial commit
[WebKit-https.git] / Source / widgetsapi.pri
1 # -------------------------------------------------------------------
2 # Target file for the QtWebKitWidgets dynamic library
3 #
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
6
7 # Use Qt5's module system
8 load(qt_build_config)
9
10 TEMPLATE = lib
11 TARGET = QtWebKitWidgets
12
13 # This is relied upon by our export macros and seems not to be properly
14 # defined by the logic in qt_module.prf as it should
15 DEFINES += QT_BUILD_WEBKITWIDGETS_LIB
16
17 WEBKIT_DESTDIR = $${ROOT_BUILD_DIR}/lib
18
19 SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebKit
20
21 INCLUDEPATH += \
22     $$SOURCE_DIR/qt/Api \
23     $$SOURCE_DIR/qt/WidgetApi \
24     $$SOURCE_DIR/qt/WebCoreSupport \
25     $$SOURCE_DIR/qt/WidgetSupport \
26     $$ROOT_WEBKIT_DIR/Source/WTF/wtf/qt
27
28 have?(qtsensors):if(enable?(DEVICE_ORIENTATION)|enable?(ORIENTATION_EVENTS)): QT += sensors
29
30 have?(qtlocation):enable?(GEOLOCATION): QT += location
31
32 use?(QT_MULTIMEDIA): QT *= multimediawidgets
33
34 contains(CONFIG, texmap): DEFINES += WTF_USE_TEXTURE_MAPPER=1
35
36 use?(PLUGIN_BACKEND_XLIB): PKGCONFIG += x11
37
38 QT += network widgets widgets-private
39 have?(QTQUICK): QT += quick
40 have?(QTPRINTSUPPORT): QT += printsupport
41
42 use?(TEXTURE_MAPPER_GL)|enable?(WEBGL) {
43     QT *= opengl
44 }
45 QT += webkit
46
47 use?(3D_GRAPHICS): WEBKIT += ANGLE
48
49 WEBKIT += javascriptcore wtf webcore
50
51 MODULE = webkitwidgets
52
53 # We want the QtWebKit API forwarding includes to live in the root build dir.
54 MODULE_BASE_DIR = $$_PRO_FILE_PWD_
55 MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
56
57 # This is the canonical list of dependencies for the public API of
58 # the QtWebKitWidgets library, and will end up in the library's prl file.
59 QT_API_DEPENDS = core gui widgets network webkit
60
61 # ---------------- Custom developer-build handling -------------------
62 #
63 # The assumption for Qt developer builds is that the module file
64 # will be put into qtbase/mkspecs/modules, and the libraries into
65 # qtbase/lib, with rpath/install_name set to the Qt lib dir.
66 #
67 # For WebKit we don't want that behavior for the libraries, as we want
68 # them to be self-contained in the WebKit build dir.
69 #
70 !production_build: CONFIG += force_independent
71
72 BASE_TARGET = $$TARGET
73
74 load(qt_module)
75
76 # Make sure the install_name of the QtWebKit library point to webkit
77 !production_build:force_independent:macx {
78     # We do our own absolute path so that we can trick qmake into
79     # using the webkit build path instead of the Qt install path.
80     CONFIG -= absolute_library_soname
81     QMAKE_LFLAGS_SONAME = $$QMAKE_LFLAGS_SONAME$$WEBKIT_DESTDIR/
82
83     !debug_and_release|build_pass {
84         # We also have to make sure the install_name is correct when
85         # the library is installed.
86         change_install_name.depends = install_target
87
88         # The install rules generated by qmake for frameworks are busted in
89         # that both the debug and the release makefile copy QtWebKit.framework
90         # into the install dir, so whatever changes we did to the release library
91         # will get overwritten when the debug library is installed. We work around
92         # that by running install_name on both, for both configs.
93         change_install_name.commands = framework_dir=\$\$(dirname $(TARGETD)); \
94             for file in \$\$(ls $$[QT_INSTALL_LIBS]/\$\$framework_dir/$$BASE_TARGET*); do \
95                 install_name_tool -id \$\$file \$\$file; \
96             done
97         default_install_target.target = install
98         default_install_target.depends += change_install_name
99
100         QMAKE_EXTRA_TARGETS += change_install_name default_install_target
101     }
102 }
103
104 SOURCES += \
105     $$PWD/WebKit/qt/WidgetApi/qgraphicswebview.cpp \
106     $$PWD/WebKit/qt/WidgetApi/qwebframe.cpp \
107     $$PWD/WebKit/qt/WidgetApi/qwebpage.cpp \
108     $$PWD/WebKit/qt/WidgetApi/qwebview.cpp \
109     $$PWD/WebKit/qt/WidgetApi/qwebinspector.cpp \
110     $$PWD/WebKit/qt/WidgetSupport/QtFallbackWebPopup.cpp \
111     $$PWD/WebKit/qt/WidgetSupport/QtWebComboBox.cpp \
112     $$PWD/WebKit/qt/WidgetSupport/QWebUndoCommand.cpp \
113     $$PWD/WebKit/qt/WidgetSupport/InitWebKitQt.cpp \
114     $$PWD/WebKit/qt/WidgetSupport/InspectorClientWebPage.cpp \
115     $$PWD/WebKit/qt/WidgetSupport/PageClientQt.cpp \
116     $$PWD/WebKit/qt/WidgetSupport/QStyleFacadeImp.cpp \
117     $$PWD/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.cpp \
118     $$PWD/WebKit/qt/WidgetSupport/QWidgetPluginImpl.cpp
119
120 HEADERS += \
121     $$PWD/WebKit/qt/WidgetApi/qgraphicswebview.h \
122     $$PWD/WebKit/qt/WidgetApi/qwebframe.h \
123     $$PWD/WebKit/qt/WidgetApi/qwebframe_p.h \
124     $$PWD/WebKit/qt/WidgetApi/qwebpage.h \
125     $$PWD/WebKit/qt/WidgetApi/qwebpage_p.h \
126     $$PWD/WebKit/qt/WidgetApi/qwebview.h \
127     $$PWD/WebKit/qt/WidgetApi/qwebinspector.h \
128     $$PWD/WebKit/qt/WidgetApi/qwebinspector_p.h \
129     $$PWD/WebKit/qt/Api/qwebkitplatformplugin.h \
130     $$PWD/WebKit/qt/WidgetSupport/InitWebKitQt.h \
131     $$PWD/WebKit/qt/WidgetSupport/InspectorClientWebPage.h \
132     $$PWD/WebKit/qt/WidgetSupport/QtFallbackWebPopup.h \
133     $$PWD/WebKit/qt/WidgetSupport/QtWebComboBox.h \
134     $$PWD/WebKit/qt/WidgetSupport/QWebUndoCommand.h \
135     $$PWD/WebKit/qt/WidgetSupport/PageClientQt.h \
136     $$PWD/WebKit/qt/WidgetSupport/QGraphicsWidgetPluginImpl.h \
137     $$PWD/WebKit/qt/WidgetSupport/QStyleFacadeImp.h \
138     $$PWD/WebKit/qt/WidgetSupport/QWidgetPluginImpl.h \
139
140 contains(QT_CONFIG, accessibility) {
141     SOURCES += $$PWD/WebKit/qt/WidgetApi/qwebviewaccessible.cpp
142     HEADERS += $$PWD/WebKit/qt/WidgetApi/qwebviewaccessible_p.h 
143 }
144
145 INCLUDEPATH += \
146     $$PWD/qt/Api \
147     $$PWD/qt/WebCoreSupport
148
149 enable?(VIDEO) {
150     !use?(GSTREAMER):use?(QT_MULTIMEDIA) {
151         HEADERS += $$PWD/WebKit/qt/WidgetSupport/FullScreenVideoWidget.h
152         SOURCES += $$PWD/WebKit/qt/WidgetSupport/FullScreenVideoWidget.cpp
153     }
154 }
155
156 use?(QT_MULTIMEDIA) {
157     SOURCES += $$PWD/WebKit/qt/WidgetSupport/DefaultFullScreenVideoHandler.cpp
158     HEADERS += $$PWD/WebKit/qt/WidgetSupport/DefaultFullScreenVideoHandler.h
159 }