diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2014-05-15 10:09:50 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-21 01:34:38 +0200 |
commit | 4be7cd09d670064728d3ea508b06bb85e3c71708 (patch) | |
tree | afd840f06b35ce7713cfe9deca7b272018c4a8d1 /qmake/generators/mac | |
parent | bf50bf737b6198a64756ce96ff9852c36e6f3066 (diff) |
xcode generator: don't modify or copy QMAKE_INFO_PLIST
If the project has a custom Info.plist assigned to
QMAKE_INFO_PLIST, we should leave it as-is without
scanning and replacing contents inside it. Since we
always copy the file to the build folder at qmake
time, any later attempts to modify the source file
will not have any effect.
A better solution is to just reference the custom
plist directly from the Xcode, without modifying it.
This change will also stop unixmake2 from assigning the
default plist to QMAKE_INFO_PLIST, since we need to
know in the xcode generator if the variable was set in
the project or not.
Task-number: QTBUG-38260
Change-Id: I3c488b2960170c544d94f9db89d3ca95ee290bdd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'qmake/generators/mac')
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index d44c2ca73f..e1e373787c 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the qmake application of the Qt Toolkit. @@ -1390,9 +1390,13 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && project->isActiveConfig("lib_bundle"))) { QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString(), Option::output_dir, input_dir); - if (plist.isEmpty()) + if (!plist.isEmpty()) { + if (exists(plist)) + t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", plist) << ";\n"; + else + warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", plist.toLatin1().constData()); + } else { plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); - if (exists(plist)) { QFile plist_in_file(plist); if (plist_in_file.open(QIODevice::ReadOnly)) { QTextStream plist_in(&plist_in_file); @@ -1422,8 +1426,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";\n"; } } - } else { - warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", plist.toLatin1().constData()); } } |