Add ewk_view_fullscreen_exit to exit fullscreen mode
[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 WEBKIT_DESTDIR = $${ROOT_BUILD_DIR}/lib
11
12 haveQt(5) {
13     # Use Qt5's module system
14     load(qt_build_config)
15     MODULE = webkit
16     MODULE_PRI = ../Tools/qmake/qt_webkit.pri
17
18     # ---------------- Custom developer-build handling -------------------
19     #
20     # The assumption for Qt developer builds is that the module file
21     # will be put into qtbase/mkspecs/modules, and the libraries into
22     # qtbase/lib, with rpath/install_name set to the Qt lib dir.
23     #
24     # For WebKit we don't want that behavior for the libraries, as we want
25     # them to be self-contained in the WebKit build dir.
26     #
27     CONFIG += force_independent
28
29     BASE_TARGET = $$TARGET
30
31     load(qt_module_config)
32
33     # Make sure the module config doesn't override our preferred build config.
34     debug_and_release:if(!debug|!release) {
35         # Removing debug_and_release causes issues with lib suffixes when building debug on Windows.
36         # Work around it by only removing build_all, and still create the Makefiles for both configurations.
37         win32*: CONFIG -= build_all
38         else: CONFIG -= debug_and_release
39     }
40
41     # Allow doing a debug-only build of WebKit (not supported by Qt)
42     macx:!debug_and_release:debug: TARGET = $$BASE_TARGET
43
44     # Make sure the install_name of the QtWebKit library point to webkit
45     macx {
46         # We do our own absolute path so that we can trick qmake into
47         # using the webkit build path instead of the Qt install path.
48         CONFIG -= absolute_library_soname
49         QMAKE_LFLAGS_SONAME = $$QMAKE_LFLAGS_SONAME$$WEBKIT_DESTDIR/
50
51         !debug_and_release|build_pass {
52             # We also have to make sure the install_name is correct when
53             # the library is installed.
54             change_install_name.depends = install_target
55
56             # The install rules generated by qmake for frameworks are busted in
57             # that both the debug and the release makefile copy QtWebKit.framework
58             # into the install dir, so whatever changes we did to the release library
59             # will get overwritten when the debug library is installed. We work around
60             # that by running install_name on both, for both configs.
61             change_install_name.commands = framework_dir=\$\$(dirname $(TARGETD)); \
62                 for file in \$\$(ls $$[QT_INSTALL_LIBS]/\$\$framework_dir/$$BASE_TARGET*); do \
63                     install_name_tool -id \$\$file \$\$file; \
64                 done
65             default_install_target.target = install
66             default_install_target.depends += change_install_name
67
68             QMAKE_EXTRA_TARGETS += change_install_name default_install_target
69         }
70     }
71 } else {
72     VERSION = $$QT_VERSION
73     DESTDIR = $$WEBKIT_DESTDIR
74 }
75
76 runSyncQt() # Generate forwarding headers for the QtWebKit API
77
78 WEBKIT += wtf
79
80 WEBKIT += javascriptcore
81
82 WEBKIT += webcore
83
84 !no_webkit2 {
85     WEBKIT += webkit2
86
87     # Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
88     # file, which in turn runs syncqt to update the forwarding headers.
89     QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
90     QMAKE_INTERNAL_INCLUDED_FILES *= WebKit/WebKit1.pro
91 }
92
93 !no_webkit1: WEBKIT += webkit1
94
95 # ------------- Install rules -------------
96
97 haveQt(5) {
98     # Install rules handled by Qt's module system
99 } else {
100     # For Qt4 we have to set up install rules manually
101
102     # Syncqt has already run at this point, so we can use headers.pri
103     # as a basis for our install-rules
104     HEADERS_PRI = $${ROOT_BUILD_DIR}/include/$${QT.webkit.name}/headers.pri
105     !include($$HEADERS_PRI): error(Failed to resolve install headers)
106
107     headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
108     !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/$${TARGET}
109     else: headers.path = $$[QT_INSTALL_HEADERS]/$${TARGET}
110     INSTALLS += headers
111
112     !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
113     else: target.path = $$[QT_INSTALL_LIBS]
114     INSTALLS += target
115
116     unix {
117         CONFIG += create_pc create_prl
118         QMAKE_PKGCONFIG_LIBDIR = $$target.path
119         QMAKE_PKGCONFIG_INCDIR = $$headers.path
120         QMAKE_PKGCONFIG_DESTDIR = pkgconfig
121         lib_replace.match = $$re_escape($$DESTDIR)
122         lib_replace.replace = $$[QT_INSTALL_LIBS]
123         QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
124     }
125
126     mac {
127         !static:contains(QT_CONFIG, qt_framework) {
128             # Build QtWebKit as a framework, to match how Qt was built
129             CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
130
131             # For debug_and_release configs, only copy headers in release
132             !debug_and_release|if(build_pass:CONFIG(release, debug|release)) {
133                 FRAMEWORK_HEADERS.version = Versions
134                 FRAMEWORK_HEADERS.files = $${headers.files}
135                 FRAMEWORK_HEADERS.path = Headers
136                 QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
137             }
138         }
139
140         QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}"
141     }
142 }