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