WebKit: [qt] Better check for the declarative plugin inclusion.
[WebKit-https.git] / WebKit / qt / declarative / declarative.pro
1 TARGET  = qmlwebkitplugin
2 TARGETPATH = QtWebKit
3
4 TEMPLATE = lib
5 CONFIG += qt plugin
6
7 win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release
8
9 QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir
10 copy2build.input = QMLDIRFILE
11 CONFIG(QTDIR_build) {
12     copy2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
13 } else {
14     copy2build.output = $$OUTPUT_DIR/imports/$$TARGETPATH/qmldir
15 }
16 !contains(TEMPLATE_PREFIX, vc):copy2build.variable_out = PRE_TARGETDEPS
17 copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
18 copy2build.name = COPY ${QMAKE_FILE_IN}
19 copy2build.CONFIG += no_link
20 QMAKE_EXTRA_COMPILERS += copy2build
21
22 TARGET = $$qtLibraryTarget($$TARGET)
23 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
24
25 wince*:LIBS += $$QMAKE_LIBS_GUI
26
27 symbian: {
28     TARGET.EPOCALLOWDLLDATA=1
29     TARGET.CAPABILITY = All -Tcb
30     load(armcc_warnings)
31 }
32
33 include(../../../WebKit.pri)
34
35 QT += declarative
36
37 linux-* {
38     # From Creator's src/rpath.pri:
39     # Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
40     # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var.
41     QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
42     MY_RPATH = $$join(QMAKE_RPATHDIR, ":")
43
44     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${MY_RPATH}\'
45     QMAKE_RPATHDIR =
46 } else {
47     QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
48 }
49
50 SOURCES += qdeclarativewebview.cpp plugin.cpp
51 HEADERS += qdeclarativewebview_p.h
52
53 CONFIG(QTDIR_build) {
54     DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
55 } else {
56     DESTDIR = $$OUTPUT_DIR/imports/$$TARGETPATH
57 }
58 target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
59
60
61 qmldir.files += $$PWD/qmldir
62 qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
63
64 symbian:{
65     load(data_caging_paths)
66     include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
67
68     importFiles.sources = qmlwebkitplugin.dll qmldir
69     importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
70
71     DEPLOYMENT = importFiles
72 }
73
74 INSTALLS += target qmldir