api.pri 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # -------------------------------------------------------------------
  2. # Project file for the QtWebKit C++ APIs
  3. #
  4. # See 'Tools/qmake/README' for an overview of the build system
  5. # -------------------------------------------------------------------
  6. # Use Qt5's module system
  7. load(qt_build_config)
  8. TEMPLATE = lib
  9. TARGET = QtWebKit
  10. WEBKIT_DESTDIR = $${ROOT_BUILD_DIR}/lib
  11. WEBKIT += wtf javascriptcore webcore
  12. build?(webkit1): WEBKIT += webkit1
  13. build?(webkit2) {
  14. WEBKIT += webkit2
  15. have?(QTQUICK): WEBKIT += webkit2qml
  16. }
  17. # Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
  18. # file, which in turn runs syncqt to update the forwarding headers.
  19. build?(webkit1): {
  20. QMAKE_INTERNAL_INCLUDED_FILES *= WebKit/WebKit1.pro
  21. }
  22. build?(webkit2): QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
  23. use?(3D_GRAPHICS): WEBKIT += angle
  24. MODULE = webkit
  25. CONFIG += creating_module
  26. # This is the canonical list of dependencies for the public API of
  27. # the QtWebKit library, and will end up in the library's prl file.
  28. QT_API_DEPENDS = core gui network
  29. # We want the QtWebKit API forwarding includes to live in the root build dir.
  30. MODULE_BASE_DIR = $$_PRO_FILE_PWD_
  31. MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
  32. QMAKE_DOCS = $$PWD/qtwebkit.qdocconf
  33. # We load the relevant modules here, so that the effects of each module
  34. # on the QT variable can be picked up when we later load(qt_module).
  35. load(webkit_modules)
  36. # Resources have to be included directly in the final binary for MSVC.
  37. # The linker won't pick them from a static library since they aren't referenced.
  38. win* {
  39. RESOURCES += $$PWD/WebCore/WebCore.qrc
  40. include_webinspector {
  41. # WEBCORE_GENERATED_SOURCES_DIR is defined in WebCore.pri, included by
  42. # load(webkit_modules) if WEBKIT contains webcore.
  43. RESOURCES += \
  44. $$PWD/WebCore/inspector/front-end/WebKit.qrc \
  45. $${WEBCORE_GENERATED_SOURCES_DIR}/InspectorBackendCommands.qrc
  46. }
  47. }
  48. # ---------------- Custom developer-build handling -------------------
  49. #
  50. # The assumption for Qt developer builds is that the module file
  51. # will be put into qtbase/mkspecs/modules, and the libraries into
  52. # qtbase/lib, with rpath/install_name set to the Qt lib dir.
  53. #
  54. # For WebKit we don't want that behavior for the libraries, as we want
  55. # them to be self-contained in the WebKit build dir.
  56. #
  57. !production_build: CONFIG += force_independent
  58. BASE_TARGET = $$TARGET
  59. load(qt_module)
  60. # Make sure the install_name of the QtWebKit library point to webkit
  61. force_independent:macx {
  62. # We do our own absolute path so that we can trick qmake into
  63. # using the webkit build path instead of the Qt install path.
  64. CONFIG -= absolute_library_soname
  65. QMAKE_LFLAGS_SONAME = $$QMAKE_LFLAGS_SONAME$$WEBKIT_DESTDIR/
  66. !debug_and_release|build_pass {
  67. # We also have to make sure the install_name is correct when
  68. # the library is installed.
  69. change_install_name.depends = install_target
  70. # The install rules generated by qmake for frameworks are busted in
  71. # that both the debug and the release makefile copy QtWebKit.framework
  72. # into the install dir, so whatever changes we did to the release library
  73. # will get overwritten when the debug library is installed. We work around
  74. # that by running install_name on both, for both configs.
  75. change_install_name.commands = framework_dir=\$\$(dirname $(TARGETD)); \
  76. for file in \$\$(ls $$[QT_INSTALL_LIBS]/\$\$framework_dir/$$BASE_TARGET*); do \
  77. install_name_tool -id \$\$file \$\$file; \
  78. done
  79. default_install_target.target = install
  80. default_install_target.depends += change_install_name
  81. QMAKE_EXTRA_TARGETS += change_install_name default_install_target
  82. }
  83. }
  84. qnx {
  85. # see: https://bugs.webkit.org/show_bug.cgi?id=93460
  86. # the gcc 4.4.2 used in the qnx bbndk cannot cope with
  87. # the linkage step of libQtWebKit, adding a dummy .cpp
  88. # file fixes this though - so do this here
  89. dummyfile.target = dummy.cpp
  90. dummyfile.commands = touch $$dummyfile.target
  91. QMAKE_EXTRA_TARGETS += dummyfile
  92. GENERATED_SOURCES += $$dummyfile.target
  93. }