tizen beta release
[framework/web/webkit-efl.git] / Source / api.pri
1 # -------------------------------------------------------------------
2 # Project file for the QtWebKit C++ APIs
3 #
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
6
7 TEMPLATE = lib
8 TARGET = QtWebKit
9
10 DESTDIR = $${ROOT_BUILD_DIR}/lib
11
12 runSyncQt() # Generate forwarding headers for the QtWebKit API
13
14 load(features)
15
16 include(WebKit/WebKit.pri)
17
18 CONFIG += wtf
19
20 !v8:CONFIG += javascriptcore
21
22 CONFIG += webcore
23
24 !no_webkit2 {
25     CONFIG += webkit2
26     QT += declarative
27
28     # Ensure that changes to the WebKit2 API will trigger a qmake of this
29     # file, which in turn runs syncqt to update the forwarding headers.
30     QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
31 }
32
33 QT += network
34 haveQt(5): QT += widgets printsupport
35
36 win32*:!win32-msvc* {
37     # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
38     contains(DEFINES, ENABLE_WEBGL=1)|contains(CONFIG, texmap): LIBS += $$QMAKE_LIBS_OPENGL
39 }
40
41 !static: DEFINES += QT_MAKEDLL
42
43 SOURCES += \
44     $$PWD/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
45     $$PWD/WebKit/qt/WebCoreSupport/QtWebComboBox.cpp \
46     $$PWD/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp \
47     $$PWD/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp \
48     $$PWD/WebKit/qt/WebCoreSupport/DragClientQt.cpp \
49     $$PWD/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
50     $$PWD/WebKit/qt/WebCoreSupport/EditorClientQt.cpp \
51     $$PWD/WebKit/qt/WebCoreSupport/EditCommandQt.cpp \
52     $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
53     $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
54     $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
55     $$PWD/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp \
56     $$PWD/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp \
57     $$PWD/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp \
58     $$PWD/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \
59     $$PWD/WebKit/qt/WebCoreSupport/PageClientQt.cpp \
60     $$PWD/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp \
61     $$PWD/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp \
62     $$PWD/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.cpp \
63     $$PWD/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp \
64     $$PWD/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
65
66 HEADERS += \
67     $$PWD/WebKit/qt/WebCoreSupport/InitWebCoreQt.h \
68     $$PWD/WebKit/qt/WebCoreSupport/InspectorServerQt.h \
69     $$PWD/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \
70     $$PWD/WebKit/qt/WebCoreSupport/QtWebComboBox.h \
71     $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
72     $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h \
73     $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h \
74     $$PWD/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h \
75     $$PWD/WebKit/qt/WebCoreSupport/PageClientQt.h \
76     $$PWD/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h \
77     $$PWD/WebKit/qt/WebCoreSupport/PopupMenuQt.h \
78     $$PWD/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.h \
79     $$PWD/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h \
80     $$PWD/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h
81
82 contains(DEFINES, ENABLE_VIDEO=1) {
83     !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
84         HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.h
85         SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.cpp
86     }
87
88     contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
89         HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
90         SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
91     }
92
93     contains(DEFINES, WTF_USE_QTKIT=1) {
94         INCLUDEPATH += \
95             $$PWD/WebCore/platform/qt/ \
96             $$PWD/WebCore/platform/mac/ \
97             $$PWD/../WebKitLibraries/
98
99         DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
100
101         contains(CONFIG, "x86") {
102             DEFINES+=NS_BUILD_32_LIKE_64
103         }
104
105         HEADERS += \
106             $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.h \
107             $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h
108
109         OBJECTIVE_SOURCES += \
110             $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.mm \
111             $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm
112
113         LIBS += -framework Security -framework IOKit
114
115         # We can know the Mac OS version by using the Darwin major version
116         DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
117         DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
118         equals(DARWIN_MAJOR_VERSION, "11") {
119             LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
120         } else:equals(DARWIN_MAJOR_VERSION, "10") {
121             LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
122         } else:equals(DARWIN_MAJOR_VERSION, "9") {
123             LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
124         }
125     }
126 }
127
128 contains(DEFINES, ENABLE_ICONDATABASE=1) {
129     HEADERS += \
130         $$PWD/WebCore/loader/icon/IconDatabaseClient.h \
131         $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
132
133     SOURCES += \
134         $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.cpp
135 }
136
137 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
138     HEADERS += \
139         $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
140         $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h \
141         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h \
142         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h \
143         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
144
145     SOURCES += \
146         $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp \
147         $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp \
148         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp \
149         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp \
150         $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
151 }
152
153 contains(DEFINES, ENABLE_GEOLOCATION=1) {
154      haveQt(5): QT += location
155
156      HEADERS += \
157         $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
158      SOURCES += \
159         $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
160 }
161
162 contains(CONFIG, texmap) {
163     DEFINES += WTF_USE_TEXTURE_MAPPER=1
164 }
165
166
167 # ------------- Install rules -------------
168
169 modulefile.files = $$QT.webkit.modulefile
170 mkspecs = $$[QMAKE_MKSPECS]
171 mkspecs = $$split(mkspecs, :)
172 modulefile.path = $$last(mkspecs)/modules
173 INSTALLS += modulefile
174
175 # Syncqt has already run at this point, so we can use headers.pri
176 # as a basis for our install-rules
177 HEADERS_PRI = $${ROOT_BUILD_DIR}/include/$$TARGET/headers.pri
178 !include($$HEADERS_PRI): error(Failed to resolve install headers)
179
180 headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
181 !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/$${TARGET}
182 else: headers.path = $$[QT_INSTALL_HEADERS]/$${TARGET}
183 INSTALLS += headers
184
185 !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
186 else: target.path = $$[QT_INSTALL_LIBS]
187 INSTALLS += target
188
189 unix {
190     CONFIG += create_pc create_prl
191     QMAKE_PKGCONFIG_LIBDIR = $$target.path
192     QMAKE_PKGCONFIG_INCDIR = $$headers.path
193     QMAKE_PKGCONFIG_DESTDIR = pkgconfig
194     lib_replace.match = $$re_escape($$DESTDIR)
195     lib_replace.replace = $$[QT_INSTALL_LIBS]
196     QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
197 }
198
199 mac {
200     !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
201         !build_pass {
202             message("Building QtWebKit as a framework, as that's how Qt was built. You can")
203             message("override this by passing CONFIG+=webkit_no_framework to build-webkit.")
204         } else {
205             isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
206         }
207
208         CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
209
210         # For debug_and_release configs, only copy headers in release
211         !debug_and_release|if(build_pass:CONFIG(release, debug|release)) {
212             FRAMEWORK_HEADERS.version = Versions
213             FRAMEWORK_HEADERS.files = $${headers.files}
214             FRAMEWORK_HEADERS.path = Headers
215             QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
216         }
217     }
218
219     QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}"
220 }
221
222 plugin_backend_xlib {
223     CONFIG *= link_pkgconfig
224     PKGCONFIG += x11
225 }
226
227 linux-g++*: {
228     PRE_TARGETDEPS += $$PWD/qtwebkit-export.map
229     QMAKE_LFLAGS += -Wl,--version-script=$$PWD/qtwebkit-export.map
230 }