~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to mkspecs/features/qt.prf

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
CONFIG *= thread
 
2
 
 
3
#handle defines
 
4
win32 {
 
5
   contains(QT_CONFIG, shared) {
 
6
      # this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp
 
7
      # function VcprojGenerator::initDeploymentTool(), which contains some hardcoded
 
8
      # library names (the ones that were static in Qt 4)
 
9
      # it probably doesn't work anymore and should not be in this file
 
10
      QMAKE_QT_DLL = 1
 
11
   }
 
12
}
 
13
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
 
14
contains(QT_CONFIG, force_asserts):DEFINES += QT_FORCE_ASSERTS
 
15
no_keywords:DEFINES += QT_NO_KEYWORDS
 
16
plugin { #Qt plugins
 
17
   static:DEFINES += QT_STATICPLUGIN
 
18
   DEFINES += QT_PLUGIN
 
19
 
 
20
   # Triggers both on Qt being configured with -arch boundschecker,
 
21
   # and if you qmake CONFIG+=boundchecker on your plugin project
 
22
   boundschecker|contains(QT_CONFIG,boundschecker) {
 
23
      # This option is added for plugins when Qt is configured for Boundschecker,
 
24
      # since we want Boundschecker to not instrument the qt_plugin_query_verification_data
 
25
      # function, as we call that function without the plugin's dependent DLLs, thus
 
26
      # Boundscheckers instrumentation will fail. The function only returns a const char *,
 
27
      # so no instrumentation is really needed on that function anyways.
 
28
      QMAKE_CFLAGS += /nmignore:*:qt_plugin_query_verification_data
 
29
      QMAKE_CXXFLAGS += /nmignore:*:qt_plugin_query_verification_data
 
30
   }
 
31
}
 
32
 
 
33
qtestlib {
 
34
    warning("CONFIG+=qtestlib is deprecated. Use QT+=testlib instead.")
 
35
    QT += testlib
 
36
}
 
37
qdbus {
 
38
    warning("CONFIG+=qdbus is deprecated. Use QT+=dbus instead.")
 
39
    QT += dbus
 
40
}
 
41
help {
 
42
    warning("CONFIG+=help is deprecated. Use QT+=help instead.")
 
43
    QT += help-private   # sic!
 
44
}
 
45
designer {
 
46
    warning("CONFIG+=designer is deprecated. Use QT+=designer instead.")
 
47
    QT += designer
 
48
}
 
49
uitools {
 
50
    warning("CONFIG+=uitools is deprecated. Use QT+=uitools instead.")
 
51
    QT += uitools
 
52
}
 
53
qaxcontainer {
 
54
    warning("CONFIG+=qaxcontainer is deprecated. Use QT+=axcontainer instead.")
 
55
    QT += axcontainer
 
56
}
 
57
qaxserver {
 
58
    warning("CONFIG+=qaxserver is deprecated. Use QT+=axserver instead.")
 
59
    QT += axserver
 
60
}
 
61
 
 
62
unset(using_privates)
 
63
qtAddModules(QT, LIBS)
 
64
qtAddModules(QT_PRIVATE, LIBS_PRIVATE)
 
65
!isEmpty(using_privates):!auto_use_privates:!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
 
66
    message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
 
67
    message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
 
68
    message("This is not a bug, but a result of using Qt internals. You have been warned!")
 
69
}
 
70
 
 
71
wince*:static:gui {
 
72
   QTLIB += qmenu_wce.res
 
73
}
 
74
 
 
75
QT_PLUGIN_VERIFY = DEPLOYMENT_PLUGIN
 
76
contains(QT_CONFIG, static) {
 
77
    QT_PLUGIN_VERIFY += QTPLUGIN
 
78
    force_import_plugins|contains(TEMPLATE, .*app) {
 
79
        needs_qpa_plugin:import_qpa_plugin {
 
80
            qpa_minimal_plugin: \
 
81
                QTPLUGIN += qminimal
 
82
            else: \
 
83
                QTPLUGIN += $$QT_DEFAULT_QPA_PLUGIN
 
84
        }
 
85
        import_plugins:!isEmpty(QTPLUGIN) {
 
86
            IMPORT_FILE_CONT = \
 
87
                "// This file is autogenerated by qmake. It imports static plugin classes for" \
 
88
                "// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables." \
 
89
                "$${LITERAL_HASH}include <QtPlugin>"
 
90
            for(IMPORT_PLUG, $$list($$unique(QTPLUGIN))) {
 
91
                PLUG_CLASS = $$eval(QT_PLUGIN.$${IMPORT_PLUG}.CLASS_NAME)
 
92
                !isEmpty(PLUG_CLASS): \
 
93
                    IMPORT_FILE_CONT += "Q_IMPORT_PLUGIN($$PLUG_CLASS)"
 
94
                else: \
 
95
                    warning("Plugin class name could not be determined for $$IMPORT_PLUG plugin.")
 
96
            }
 
97
            IMPORT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_import.cpp
 
98
            write_file($$IMPORT_CPP, IMPORT_FILE_CONT)|error("Aborting.")
 
99
            SOURCES += $$IMPORT_CPP
 
100
            QMAKE_DISTCLEAN += $$IMPORT_CPP
 
101
        }
 
102
    }
 
103
}
 
104
 
 
105
for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
 
106
    for(QTPLUG, $$list($$lower($$unique($$QT_CURRENT_VERIFY)))) {
 
107
       # Check if the plugin is known to Qt. We can use this to determine
 
108
       # the plugin path. Unknown plugins must rely on the default link path.
 
109
       QT_PLUGINPATH = $$eval(QT_PLUGIN.$${QTPLUG}.TYPE)
 
110
 
 
111
        # Generate the plugin linker line
 
112
        target_qt:isEqual(TARGET, QTPLUG) {
 
113
            warning($$TARGET cannot have a QTPLUGIN of $$QTPLUG)
 
114
        } else {
 
115
            QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix()
 
116
        }
 
117
 
 
118
        # Only link against plugin in static builds
 
119
        isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
 
120
            !isEmpty(QT_PLUGINPATH): LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/$$QT_PLUGINPATH
 
121
                LIBS += $$QT_LINKAGE
 
122
            # if the plugin is linked statically there is no need to deploy it
 
123
            DEPLOYMENT_PLUGIN -= $$QT_CURRENT_VERIFY
 
124
        }
 
125
        isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:wince*: {
 
126
            QT_ITEM =
 
127
            CONFIG(debug, debug|release): QT_ITEM = $${QTPLUG}d4.dll
 
128
            else: QT_ITEM = $${QTPLUG}4.dll
 
129
 
 
130
            eval(qt_additional_plugin_$${QTPLUG}.files = $$[QT_INSTALL_PLUGINS/get]/$${QT_PLUGINPATH}/$${QT_ITEM})
 
131
            eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH})
 
132
 
 
133
            DEPLOYMENT *= qt_additional_plugin_$${QTPLUG}
 
134
        }
 
135
    }
 
136
}