summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/Makefile.unix6
-rw-r--r--qmake/Makefile.win321
-rw-r--r--qmake/doc/snippets/code/doc_src_qmake-manual.pro21
-rw-r--r--qmake/doc/src/qmake-manual.qdoc97
-rw-r--r--qmake/generators/unix/unixmake2.cpp14
-rw-r--r--qmake/generators/win32/cesdkhandler.cpp22
-rw-r--r--qmake/generators/win32/mingw_make.cpp7
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp10
-rw-r--r--qmake/generators/win32/winmakefile.cpp17
-rw-r--r--qmake/library/qmakeevaluator.cpp3
-rw-r--r--qmake/library/qmakeevaluator.h1
11 files changed, 78 insertions, 121 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 86f884fe20..520ae667e9 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -13,7 +13,7 @@ OBJS=project.o option.o property.o main.o ioutils.o proitems.o \
#qt code
QOBJS=qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o \
- qdebug.o qmalloc.o qglobal.o \
+ qringbuffer.o qdebug.o qmalloc.o qglobal.o \
qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o \
qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o \
qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o \
@@ -44,6 +44,7 @@ DEPEND_SRC = \
$(SOURCE_PATH)/src/corelib/tools/qstring_compat.cpp \
$(SOURCE_PATH)/src/corelib/io/qfiledevice.cpp \
$(SOURCE_PATH)/src/corelib/io/qtextstream.cpp $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp \
+ $(SOURCE_PATH)/src/corelib/tools/qringbuffer.cpp \
$(SOURCE_PATH)/src/corelib/io/qdebug.cpp \
$(SOURCE_PATH)/src/corelib/global/qmalloc.cpp \
$(SOURCE_PATH)/src/corelib/global/qglobal.cpp $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp \
@@ -242,6 +243,9 @@ qsettings_win.o: $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp
qiodevice.o: $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp
+qringbuffer.o: $(SOURCE_PATH)/src/corelib/tools/qringbuffer.cpp
+ $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qringbuffer.cpp
+
qdebug.o: $(SOURCE_PATH)/src/corelib/io/qdebug.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qdebug.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 9dda6ca1e7..272a0c09b1 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -88,6 +88,7 @@ QTOBJS= \
qglobal.obj \
qhash.obj \
qiodevice.obj \
+ qringbuffer.obj \
qdebug.obj \
qlist.obj \
qlinkedlist.obj \
diff --git a/qmake/doc/snippets/code/doc_src_qmake-manual.pro b/qmake/doc/snippets/code/doc_src_qmake-manual.pro
index 43de125446..6fa3ca085d 100644
--- a/qmake/doc/snippets/code/doc_src_qmake-manual.pro
+++ b/qmake/doc/snippets/code/doc_src_qmake-manual.pro
@@ -186,21 +186,6 @@ DEFINES += USE_MY_STUFF
#! [27]
-#! [28]
-myFiles.files = path\*.png
-DEPLOYMENT += myFiles
-#! [28]
-
-
-#! [29]
-myFiles.files = path\file1.ext1 path2\file2.ext1 path3\*
-myFiles.path = \some\path\on\device
-someother.files = C:\additional\files\*
-someother.path = \myFiles\path2
-DEPLOYMENT += myFiles someother
-#! [29]
-
-
#! [30]
DESTDIR = ../../lib
#! [30]
@@ -989,8 +974,12 @@ VERSION_PE_HEADER = 1.2
#! [185]
#! [186]
+RC_DEFINES += USE_MY_STUFF
+#! [186]
+
+#! [187]
win32-g++:contains(QMAKE_HOST.arch, x86_64):{
message("Host is 64bit")
...
}
-#! [186]
+#! [187]
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index a2afeaf765..d54dc9569a 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -1120,38 +1120,6 @@
Specifies a list of all directories to look in to resolve dependencies. This
variable is used when crawling through \c included files.
- \target DEPLOYMENT
- \section1 DEPLOYMENT
-
- \note This variable is used only on the Windows CE platform.
-
- Specifies which additional files will be deployed. Deployment means the
- transfer of files from the development system to the target device or
- emulator.
-
- Files can be deployed by either creating a Visual Studio project or using
- the \l {Using Qt Test remotely on Windows CE}{cetest} executable.
-
- For example, the following definition uploads all PNG images in \c path to
- the directory where the build target is deployed:
-
- \snippet code/doc_src_qmake-manual.pro 28
-
- The default deployment target path for Windows CE is
- \c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to
- \c{\Program Files\target}.
-
- It is also possible to specify multiple \c sources to be deployed on
- target \c paths. In addition, different variables can be used for
- deployment to different directories.
-
- For example:
-
- \snippet code/doc_src_qmake-manual.pro 29
-
- \note In Windows CE all linked Qt libraries will be deployed to the path
- specified by \c{myFiles.path}.
-
\target DEPLOYMENT_PLUGIN
\section1 DEPLOYMENT_PLUGIN
@@ -1276,6 +1244,13 @@
For more information, see \l{Installing Files}.
+ This variable is also used to specify which additional files will be
+ deployed to embedded devices.
+
+ For Windows CE, the default deployment target path is
+ \c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to
+ \c{\Program Files\target}.
+
\target LEXIMPLS
\section1 LEXIMPLS
@@ -1756,7 +1731,7 @@
\row \li .version_string \li Host OS version string
\endtable
- \snippet code/doc_src_qmake-manual.pro 186
+ \snippet code/doc_src_qmake-manual.pro 187
\target QMAKE_INCDIR
\section1 QMAKE_INCDIR
@@ -2229,52 +2204,10 @@
\section1 QT
- Specifies the Qt modules that are used by your project.
-
- The table below shows the options that can be used with the \c QT variable
- and the Qt modules that are associated with each of them:
+ Specifies the \l{All Modules}{Qt modules} that are used by your project. For
+ the value to add for each module, see the module documentation.
- \table
- \header \li Option \li Module Enabled
- \row \li axcontainer \li \l{Using ActiveX controls and COM in Qt}
- {QAxContainer}, which is
- part of the \l{Active Qt} framework
- \row \li axserver \li \l{Building ActiveX servers in Qt}
- {QAxServer}, which is
- part of the \l{Active Qt} framework
- \row \li concurrent \li \l{Qt Concurrent}
- \row \li core (included by default) \li \l{Qt Core}
- \row \li dbus \li \l{Qt D-Bus}
- \row \li declarative \li \l{Qt Quick 1} (deprecated)
- \row \li designer \li \l{Qt Designer}
- \row \li gui (included by default) \li \l{Qt GUI}
- \row \li help \li \l{Qt Help}
- \row \li multimedia \li \l{Qt Multimedia}
- \row \li multimediawidgets \li \l{Qt Multimedia Widgets}
- \row \li network \li \l{Qt Network}
- \row \li opengl \li \l{Qt OpenGL} (deprecated)
- \row \li printsupport \li \l{Qt Print Support}
- \row \li qml \li \l{Qt QML}
- \row \li qmltest \li \l{Qt QML Test}
- \row \li x11extras \li \l{Qt X11 Extras}
- \row \li quick \li \l{Qt Quick}
- \row \li script \li \l{Qt Script} (deprecated)
- \row \li scripttools \li \l{Qt Script Tools} (deprecated)
- \row \li sensors \li \l{Qt Sensors}
- \row \li serialport \li \l{Qt Serial Port}
- \row \li sql \li \l{Qt SQL}
- \row \li svg \li \l{Qt SVG}
- \row \li testlib \li \l{Qt Test}
- \row \li uitools \li \l{Qt UI Tools}
- \row \li webkit \li \l{Qt WebKit}
- \row \li webkitwidgets \li \l{Qt WebKit Widgets}
- \row \li widgets \li \l{Qt Widgets}
- \row \li winextras \li \l{Qt Windows Extras}
- \row \li xml \li \l{Qt XML} (deprecated)
- \row \li xmlpatterns \li \l{Qt XML Patterns}
- \endtable
-
- By default, \c QT contains both \c core and \c gui, ensuring that standard
+ By default, \c QT contains \c core and \c gui, ensuring that standard
GUI applications can be built without further configuration.
If you want to build a project \e without the \l{Qt GUI} module, you need to
@@ -2337,6 +2270,14 @@
.rc file. This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable
is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set.
+ \target RC_DEFINES
+ \section1 RC_DEFINES
+
+ Windows only. qmake adds the values of this variable as RC preprocessor macros
+ (/d option). If this variable is not set, the \l{DEFINES} variable is used instead.
+
+ \snippet code/doc_src_qmake-manual.pro 186
+
\target RC_ICONS
\section1 RC_ICONS
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index e4973157cd..05a090b23a 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -306,7 +306,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "include " << escapeDependencyPath(*it) << endl;
/* rules */
- t << "first: all\n";
+ t << "first:" << (!project->isActiveConfig("no_default_goal_deps") ? " all" : "") << "\n";
t << "####### Implicit rules\n\n";
t << ".SUFFIXES: " << Option::obj_ext;
for(QStringList::Iterator cit = Option::c_ext.begin(); cit != Option::c_ext.end(); ++cit)
@@ -807,11 +807,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
} else {
info_plist = escapeFilePath(fileFixify(info_plist));
}
- bool isApp = (project->first("TEMPLATE") == "app");
- QString info_plist_out =
- bundle_dir + (isApp ? "Contents/Info.plist"
- : "Versions/" + project->first("QMAKE_FRAMEWORK_VERSION")
- + "/Resources/Info.plist");
+ bool isFramework = project->first("TEMPLATE") == "lib" && project->isActiveConfig("lib_bundle");
+ QString info_plist_out = bundle_dir +
+ (isFramework ? ("Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/Resources/Info.plist")
+ : "Contents/Info.plist");
bundledFiles << info_plist_out;
alldeps << info_plist_out;
QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
@@ -844,7 +843,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
bundleIdentifier.replace('_', '-');
commonSedArgs << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" ";
- if (isApp) {
+ if (!isFramework) {
QString icon = fileFixify(var("ICON"));
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
<< "@sed ";
@@ -852,6 +851,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << arg;
t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
<< "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
+ << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
<< "" << info_plist << " >" << info_plist_out << endl;
diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp
index cbee1d0dbd..f8235bae27 100644
--- a/qmake/generators/win32/cesdkhandler.cpp
+++ b/qmake/generators/win32/cesdkhandler.cpp
@@ -49,6 +49,7 @@ struct PropertyContainer
QString value;
QMap<QString, PropertyContainer> properties;
};
+Q_DECLARE_TYPEINFO(PropertyContainer, Q_MOVABLE_TYPE);
CeSdkInfo::CeSdkInfo() : m_major(0) , m_minor(0)
{
@@ -60,7 +61,7 @@ CeSdkHandler::CeSdkHandler()
struct ContainsPathKey
{
- bool operator()(const QString &val)
+ bool operator()(const QString &val) const
{
return !(val.endsWith(QStringLiteral("MSBuildToolsPath"))
|| val.endsWith(QStringLiteral("MSBuildToolsRoot")));
@@ -69,8 +70,8 @@ struct ContainsPathKey
struct ValueFromKey
{
- ValueFromKey(const QSettings *settings) : settings(settings){}
- QString operator()(const QString &key)
+ explicit ValueFromKey(const QSettings *settings) : settings(settings) {}
+ QString operator()(const QString &key) const
{
return settings->value(key).toString();
}
@@ -178,13 +179,14 @@ QStringList CeSdkHandler::filterMsBuildToolPaths(const QStringList &paths) const
{
QStringList result;
foreach (const QString &path, paths) {
- QDir dir(path);
+ QDir dirVC110(path);
if (path.endsWith(QStringLiteral("bin")))
- dir.cdUp();
- if (dir.cd(QStringLiteral("Microsoft.Cpp\\v4.0\\V110\\Platforms"))
- || dir.cd(QStringLiteral("Microsoft.Cpp\\v4.0\\V120\\Platforms"))) {
- result << dir.absolutePath();
- }
+ dirVC110.cdUp();
+ QDir dirVC120 = dirVC110;
+ if (dirVC110.cd(QStringLiteral("Microsoft.Cpp\\v4.0\\V110\\Platforms")))
+ result << dirVC110.absolutePath();
+ if (dirVC120.cd(QStringLiteral("Microsoft.Cpp\\v4.0\\V120\\Platforms")))
+ result << dirVC120.absolutePath();
}
return result;
}
@@ -286,6 +288,8 @@ void CeSdkHandler::retrieveWEC2013SDKs()
currentSdk.m_minor = currentProperty.properties.value(QLatin1String("OSMinor")).value.toInt();
retrieveEnvironment(currentProperty.properties.value(QLatin1String("MSBuild Files110")).value.split(';'),
filteredToolPaths, &currentSdk);
+ retrieveEnvironment(currentProperty.properties.value(QLatin1String("MSBuild Files120")).value.split(';'),
+ filteredToolPaths, &currentSdk);
if (!currentSdk.m_include.isEmpty())
m_list.append(currentSdk);
}
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index c19e17bc0e..57955dc456 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -405,9 +405,14 @@ void MingwMakefileGenerator::writeRcFilePart(QTextStream &t)
}
if (!rc_file.isEmpty()) {
+
+ ProString defines = varGlue("RC_DEFINES", " -D", " -D", "");
+ if (defines.isEmpty())
+ defines = ProString(" $(DEFINES)");
+
t << escapeDependencyPath(var("RES_FILE")) << ": " << escapeDependencyPath(rc_file) << "\n\t"
<< var("QMAKE_RC") << " -i " << escapeFilePath(rc_file) << " -o " << fileVar("RES_FILE")
- << incPathStr << " $(DEFINES)\n\n";
+ << incPathStr << defines << "\n\n";
}
}
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 8e08ab248e..ae4fcfd482 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1224,7 +1224,12 @@ void VcprojGenerator::initLinkerTool()
void VcprojGenerator::initResourceTool()
{
VCConfiguration &conf = vcProject.Configuration;
- conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions;
+
+ ProStringList rcDefines = project->values("RC_DEFINES");
+ if (rcDefines.size() > 0)
+ conf.resource.PreprocessorDefinitions = rcDefines.toQStringList();
+ else
+ conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions;
foreach (const ProString &path, project->values("RC_INCLUDEPATH")) {
QString fixedPath = fileFixify(path.toQString());
@@ -1381,8 +1386,7 @@ void VcprojGenerator::initDeploymentTool()
}
}
- // foreach item in DEPLOYMENT
- foreach (const ProString &item, project->values("DEPLOYMENT")) {
+ foreach (const ProString &item, project->values("INSTALLS")) {
// get item.path
QString devicePath = project->first(ProKey(item + ".path")).toQString();
if (!conf.WinRT) {
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 386e2865fa..0d761b08a2 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -755,10 +755,6 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t)
if(!project->values("RC_FILE").isEmpty()) {
const ProString res_file = project->first("RES_FILE");
const QString rc_file = fileFixify(project->first("RC_FILE").toQString());
- // The resource tool needs to have the same defines passed in as the compiler, since you may
- // use these defines in the .rc file itself. Also, we need to add the _DEBUG define manually
- // since the compiler defines this symbol by itself, and we use it in the automatically
- // created rc file when VERSION is define the .pro file.
const ProStringList rcIncPaths = project->values("RC_INCLUDEPATH");
QString incPathStr;
@@ -770,9 +766,20 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t)
incPathStr += escapeFilePath(path);
}
+ // The resource tool may use defines. This might be the same defines passed in as the
+ // compiler, since you may use these defines in the .rc file itself.
+ // As the escape syntax for the command line defines for RC is different from that for CL,
+ // we might have to set specific defines for RC.
+ ProString defines = varGlue("RC_DEFINES", " -D", " -D", "");
+ if (defines.isEmpty())
+ defines = ProString(" $(DEFINES)");
+
+ // Also, we need to add the _DEBUG define manually since the compiler defines this symbol
+ // by itself, and we use it in the automatically created rc file when VERSION is defined
+ // in the .pro file.
t << escapeDependencyPath(res_file) << ": " << escapeDependencyPath(rc_file) << "\n\t"
<< var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "")
- << " $(DEFINES)" << incPathStr << " -fo " << escapeFilePath(res_file)
+ << defines << incPathStr << " -fo " << escapeFilePath(res_file)
<< ' ' << escapeFilePath(rc_file);
t << endl << endl;
}
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 4cfd265591..cfb95b946c 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -188,7 +188,8 @@ void QMakeEvaluator::initStatics()
{ "QMAKE_RPATH", "QMAKE_LFLAGS_RPATH" },
{ "QMAKE_FRAMEWORKDIR", "QMAKE_FRAMEWORKPATH" },
{ "QMAKE_FRAMEWORKDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS" },
- { "IN_PWD", "PWD" }
+ { "IN_PWD", "PWD" },
+ { "DEPLOYMENT", "INSTALLS" }
};
for (unsigned i = 0; i < sizeof(mapInits)/sizeof(mapInits[0]); ++i)
statics.varMap.insert(ProKey(mapInits[i].oldname), ProKey(mapInits[i].newname));
diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h
index a60adde84e..8995d49582 100644
--- a/qmake/library/qmakeevaluator.h
+++ b/qmake/library/qmakeevaluator.h
@@ -310,6 +310,7 @@ public:
QMakeHandler *m_handler;
QMakeVfs *m_vfs;
};
+Q_DECLARE_TYPEINFO(QMakeEvaluator::Location, Q_PRIMITIVE_TYPE);
Q_DECLARE_OPERATORS_FOR_FLAGS(QMakeEvaluator::LoadFlags)