make fallback handling for QMAKE_BUNDLE_EXTENSION sane
the logic was such that if the bundle name already had the specified extension which was not the default extension, the default extension would be appended, too. i don't think that was the intention ... now we simply put the default into QMAKE_BUNDLE_EXTENSION if its empty - the variable is not used anywhere else where it would be expected to preserve its emptiness, so this is safe. Change-Id: Ied34d10f9fe60756bddc0037dcb2f1d3bbfd3e12 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
4b486cb88c
commit
3b9f103155
@ -281,19 +281,19 @@ UnixMakefileGenerator::init()
|
||||
if(project->isActiveConfig("plugin")) {
|
||||
if(!project->isEmpty("QMAKE_PLUGIN_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_PLUGIN_BUNDLE_NAME"));
|
||||
if(!project->isEmpty("QMAKE_BUNDLE_EXTENSION") && !bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
if (project->isEmpty("QMAKE_BUNDLE_EXTENSION"))
|
||||
project->values("QMAKE_BUNDLE_EXTENSION").append(".plugin");
|
||||
if (!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
bundle += project->first("QMAKE_BUNDLE_EXTENSION");
|
||||
else if(!bundle.endsWith(".plugin"))
|
||||
bundle += ".plugin";
|
||||
if(project->isEmpty("QMAKE_BUNDLE_LOCATION"))
|
||||
project->values("QMAKE_BUNDLE_LOCATION").append("Contents/MacOS");
|
||||
} else {
|
||||
if(!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME"))
|
||||
bundle = unescapeFilePath(project->first("QMAKE_FRAMEWORK_BUNDLE_NAME"));
|
||||
if(!project->isEmpty("QMAKE_BUNDLE_EXTENSION") && !bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
if (project->isEmpty("QMAKE_BUNDLE_EXTENSION"))
|
||||
project->values("QMAKE_BUNDLE_EXTENSION").append(".framework");
|
||||
if (!bundle.endsWith(project->first("QMAKE_BUNDLE_EXTENSION")))
|
||||
bundle += project->first("QMAKE_BUNDLE_EXTENSION");
|
||||
else if(!bundle.endsWith(".framework"))
|
||||
bundle += ".framework";
|
||||
}
|
||||
}
|
||||
if(!bundle.isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user