WebCore.pri 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. # -------------------------------------------------------------------
  2. # This file contains shared rules used both when building WebCore
  3. # itself, and by targets that use WebCore.
  4. #
  5. # See 'Tools/qmake/README' for an overview of the build system
  6. # -------------------------------------------------------------------
  7. SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebCore
  8. QT *= network sql core-private gui-private
  9. WEBCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebCore/$${GENERATED_SOURCES_DESTDIR}
  10. INCLUDEPATH += \
  11. $$SOURCE_DIR \
  12. $$SOURCE_DIR/Modules/filesystem \
  13. $$SOURCE_DIR/Modules/geolocation \
  14. $$SOURCE_DIR/Modules/indexeddb \
  15. $$SOURCE_DIR/Modules/navigatorcontentutils \
  16. $$SOURCE_DIR/Modules/notifications \
  17. $$SOURCE_DIR/Modules/proximity \
  18. $$SOURCE_DIR/Modules/quota \
  19. $$SOURCE_DIR/Modules/webaudio \
  20. $$SOURCE_DIR/Modules/webdatabase \
  21. $$SOURCE_DIR/Modules/websockets \
  22. $$SOURCE_DIR/accessibility \
  23. $$SOURCE_DIR/bindings \
  24. $$SOURCE_DIR/bindings/generic \
  25. $$SOURCE_DIR/bridge \
  26. $$SOURCE_DIR/bridge/qt \
  27. $$SOURCE_DIR/css \
  28. $$SOURCE_DIR/dom \
  29. $$SOURCE_DIR/dom/default \
  30. $$SOURCE_DIR/editing \
  31. $$SOURCE_DIR/fileapi \
  32. $$SOURCE_DIR/history \
  33. $$SOURCE_DIR/html \
  34. $$SOURCE_DIR/html/canvas \
  35. $$SOURCE_DIR/html/forms \
  36. $$SOURCE_DIR/html/parser \
  37. $$SOURCE_DIR/html/shadow \
  38. $$SOURCE_DIR/html/track \
  39. $$SOURCE_DIR/inspector \
  40. $$SOURCE_DIR/loader \
  41. $$SOURCE_DIR/loader/appcache \
  42. $$SOURCE_DIR/loader/archive \
  43. $$SOURCE_DIR/loader/cache \
  44. $$SOURCE_DIR/loader/icon \
  45. $$SOURCE_DIR/mathml \
  46. $$SOURCE_DIR/page \
  47. $$SOURCE_DIR/page/animation \
  48. $$SOURCE_DIR/page/qt \
  49. $$SOURCE_DIR/page/scrolling \
  50. $$SOURCE_DIR/page/scrolling/coordinatedgraphics \
  51. $$SOURCE_DIR/platform \
  52. $$SOURCE_DIR/platform/animation \
  53. $$SOURCE_DIR/platform/audio \
  54. $$SOURCE_DIR/platform/graphics \
  55. $$SOURCE_DIR/platform/graphics/cpu/arm \
  56. $$SOURCE_DIR/platform/graphics/cpu/arm/filters \
  57. $$SOURCE_DIR/platform/graphics/filters \
  58. $$SOURCE_DIR/platform/graphics/filters/texmap \
  59. $$SOURCE_DIR/platform/graphics/opengl \
  60. $$SOURCE_DIR/platform/graphics/opentype \
  61. $$SOURCE_DIR/platform/graphics/qt \
  62. $$SOURCE_DIR/platform/graphics/surfaces \
  63. $$SOURCE_DIR/platform/graphics/texmap \
  64. $$SOURCE_DIR/platform/graphics/texmap/coordinated \
  65. $$SOURCE_DIR/platform/graphics/transforms \
  66. $$SOURCE_DIR/platform/image-decoders \
  67. $$SOURCE_DIR/platform/image-decoders/bmp \
  68. $$SOURCE_DIR/platform/image-decoders/ico \
  69. $$SOURCE_DIR/platform/image-decoders/gif \
  70. $$SOURCE_DIR/platform/image-decoders/jpeg \
  71. $$SOURCE_DIR/platform/image-decoders/png \
  72. $$SOURCE_DIR/platform/image-decoders/webp \
  73. $$SOURCE_DIR/platform/leveldb \
  74. $$SOURCE_DIR/platform/mock \
  75. $$SOURCE_DIR/platform/network \
  76. $$SOURCE_DIR/platform/network/qt \
  77. $$SOURCE_DIR/platform/qt \
  78. $$SOURCE_DIR/platform/sql \
  79. $$SOURCE_DIR/platform/text \
  80. $$SOURCE_DIR/platform/text/transcoder \
  81. $$SOURCE_DIR/plugins \
  82. $$SOURCE_DIR/rendering \
  83. $$SOURCE_DIR/rendering/mathml \
  84. $$SOURCE_DIR/rendering/shapes \
  85. $$SOURCE_DIR/rendering/style \
  86. $$SOURCE_DIR/rendering/svg \
  87. $$SOURCE_DIR/storage \
  88. $$SOURCE_DIR/svg \
  89. $$SOURCE_DIR/svg/animation \
  90. $$SOURCE_DIR/svg/graphics \
  91. $$SOURCE_DIR/svg/graphics/filters \
  92. $$SOURCE_DIR/svg/properties \
  93. $$SOURCE_DIR/testing \
  94. $$SOURCE_DIR/websockets \
  95. $$SOURCE_DIR/workers \
  96. $$SOURCE_DIR/xml \
  97. $$SOURCE_DIR/xml/parser \
  98. $$SOURCE_DIR/../ThirdParty
  99. INCLUDEPATH += \
  100. $$SOURCE_DIR/bridge/jsc \
  101. $$SOURCE_DIR/bindings/js \
  102. $$SOURCE_DIR/bridge/c \
  103. $$SOURCE_DIR/testing/js
  104. INCLUDEPATH += $$WEBCORE_GENERATED_SOURCES_DIR
  105. enable?(XSLT) {
  106. use?(LIBXML2) {
  107. mac {
  108. INCLUDEPATH += /usr/include/libxslt /usr/include/libxml2
  109. LIBS += -lxml2 -lxslt
  110. } else {
  111. PKGCONFIG += libxslt libxml-2.0
  112. }
  113. } else {
  114. QT *= xmlpatterns
  115. }
  116. } else:!mac:use?(LIBXML2) {
  117. PKGCONFIG += libxml-2.0
  118. }
  119. use?(ZLIB) {
  120. LIBS += -lz
  121. }
  122. enable?(NETSCAPE_PLUGIN_API) {
  123. unix {
  124. mac {
  125. INCLUDEPATH += platform/mac
  126. # Note: XP_MACOSX is defined in npapi.h
  127. } else {
  128. xlibAvailable() {
  129. CONFIG *= x11
  130. LIBS += -lXrender
  131. DEFINES += MOZ_X11
  132. }
  133. DEFINES += XP_UNIX
  134. DEFINES += ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE=1
  135. }
  136. }
  137. win32-* {
  138. LIBS += \
  139. -ladvapi32 \
  140. -lgdi32 \
  141. -lshell32 \
  142. -lshlwapi \
  143. -luser32 \
  144. -lversion
  145. }
  146. }
  147. have?(qtsensors):if(enable?(ORIENTATION_EVENTS)|enable?(DEVICE_ORIENTATION)): QT += sensors
  148. use?(QT_MOBILITY_SYSTEMINFO) {
  149. CONFIG *= mobility
  150. MOBILITY *= systeminfo
  151. }
  152. enable?(GAMEPAD) {
  153. INCLUDEPATH += \
  154. $$SOURCE_DIR/platform/linux \
  155. $$SOURCE_DIR/Modules/gamepad
  156. PKGCONFIG += libudev
  157. }
  158. use?(GSTREAMER) {
  159. DEFINES += WTF_USE_GLIB=1
  160. use?(GSTREAMER010) {
  161. PKGCONFIG += glib-2.0 gio-2.0 gstreamer-0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10 gstreamer-video-0.10
  162. } else {
  163. DEFINES += GST_API_VERSION=1.0
  164. DEFINES += GST_API_VERSION_1
  165. PKGCONFIG += glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-app-1.0 gstreamer-base-1.0 gstreamer-pbutils-1.0 gstreamer-plugins-base-1.0 gstreamer-video-1.0 gstreamer-audio-1.0
  166. }
  167. }
  168. enable?(VIDEO) {
  169. use?(GSTREAMER) {
  170. INCLUDEPATH += $$SOURCE_DIR/platform/graphics/gstreamer
  171. } else:use?(QT_MULTIMEDIA) {
  172. QT *= multimedia
  173. }
  174. }
  175. enable?(WEB_AUDIO) {
  176. use?(GSTREAMER) {
  177. DEFINES += WTF_USE_WEBAUDIO_GSTREAMER=1
  178. INCLUDEPATH += $$SOURCE_DIR/platform/audio/gstreamer
  179. use?(GSTREAMER010) {
  180. PKGCONFIG += gstreamer-audio-0.10 gstreamer-fft-0.10
  181. } else {
  182. PKGCONFIG += gstreamer-audio-1.0 gstreamer-fft-1.0
  183. }
  184. }
  185. }
  186. use?(3D_GRAPHICS) {
  187. win32: {
  188. win32-g++: {
  189. # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
  190. contains(QT_CONFIG, opengles2) {
  191. CONFIG(debug, debug|release):contains(QT_CONFIG, angle) {
  192. LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
  193. } else {
  194. LIBS += $$QMAKE_LIBS_OPENGL_ES2
  195. }
  196. } else {
  197. LIBS += $$QMAKE_LIBS_OPENGL
  198. }
  199. }
  200. } else {
  201. contains(QT_CONFIG, opengles2): CONFIG += egl
  202. }
  203. }
  204. use?(GRAPHICS_SURFACE) {
  205. mac: LIBS += -framework IOSurface -framework CoreFoundation
  206. linux-*: {
  207. LIBS += -lXcomposite -lXrender
  208. CONFIG *= x11
  209. }
  210. }
  211. have?(sqlite3) {
  212. mac {
  213. LIBS += -lsqlite3
  214. } else {
  215. PKGCONFIG += sqlite3
  216. }
  217. } else {
  218. SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
  219. isEmpty(SQLITE3SRCDIR): SQLITE3SRCDIR = ../../../qtbase/src/3rdparty/sqlite/
  220. exists($${SQLITE3SRCDIR}/sqlite3.c) {
  221. INCLUDEPATH += $${SQLITE3SRCDIR}
  222. DEFINES += SQLITE_CORE SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
  223. } else {
  224. INCLUDEPATH += $${SQLITE3SRCDIR}
  225. LIBS += -lsqlite3
  226. }
  227. }
  228. use?(libjpeg): LIBS += -ljpeg
  229. use?(libpng): LIBS += -lpng
  230. use?(webp): LIBS += -lwebp
  231. enable?(opencl) {
  232. LIBS += -lOpenCL
  233. INCLUDEPATH += $$SOURCE_DIR/platform/graphics/gpu/opencl
  234. }
  235. mac {
  236. LIBS += -framework Carbon -framework AppKit -framework IOKit
  237. }
  238. win32 {
  239. INCLUDEPATH += $$SOURCE_DIR/platform/win
  240. wince* {
  241. # see https://bugs.webkit.org/show_bug.cgi?id=43442
  242. DEFINES += HAVE_LOCALTIME_S=0
  243. LIBS += -lmmtimer
  244. LIBS += -lole32
  245. }
  246. else {
  247. LIBS += -lgdi32
  248. LIBS += -lole32
  249. LIBS += -luser32
  250. }
  251. }
  252. # Remove whole program optimizations due to miscompilations
  253. win32-msvc2005|win32-msvc2008|win32-msvc2010|wince*:{
  254. QMAKE_CFLAGS_LTCG -= -GL
  255. QMAKE_CXXFLAGS_LTCG -= -GL
  256. # Disable incremental linking for windows 32bit OS debug build as WebKit is so big
  257. # that linker failes to link incrementally in debug mode.
  258. ARCH = $$(PROCESSOR_ARCHITECTURE)
  259. WOW64ARCH = $$(PROCESSOR_ARCHITEW6432)
  260. equals(ARCH, x86):{
  261. isEmpty(WOW64ARCH): QMAKE_LFLAGS_DEBUG += /INCREMENTAL:NO
  262. }
  263. }
  264. mac {
  265. LIBS_PRIVATE += -framework Carbon -framework AppKit
  266. }
  267. # -ffunction-section conflicts with -pg option
  268. !contains(CONFIG, gprof) {
  269. unix:!mac:*-g++*:QMAKE_CXXFLAGS += -ffunction-sections
  270. }
  271. unix:!mac:*-g++*:QMAKE_CXXFLAGS += -fdata-sections
  272. unix:!mac:*-g++*:QMAKE_LFLAGS += -Wl,--gc-sections
  273. linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
  274. enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
  275. !production_build:have?(FONTCONFIG): PKGCONFIG += fontconfig