qmake: Don't treat .xcodeproj directories as OUT_PWD when passed with -o
The Xcode generator creates a makefile for running 'make qmake', and the makefile passes -o to ensure it writes to the same Xcode project. This fails when qmake then treats -o foo.xcodeproj/project.xcproj as not only setting the output filename, but also the output directory to foo.xcodeproj, which results in the Xcode project trying to reference files relative to this directory, such as '../main.cpp'. Unfortunatly the output filename parsing happens too early for us to know whether or not the generator is Xcode, so we just have to assume that a certain combination of output filename and directories means we are generating an Xcode project. Change-Id: I0901d4db995f287c35cbbbd015683d5abda6d0f5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
parent
883efa10cd
commit
3cc738dfc7
@ -116,6 +116,11 @@ int runQMake(int argc, char **argv)
|
||||
if(!tmp_dir.isEmpty() && QFile::exists(tmp_dir))
|
||||
dir = tmp_dir;
|
||||
}
|
||||
#ifdef Q_OS_MAC
|
||||
if (fi.fileName().endsWith(QStringLiteral(".pbxproj"))
|
||||
&& dir.endsWith(QStringLiteral(".xcodeproj")))
|
||||
dir += QStringLiteral("/..");
|
||||
#endif
|
||||
if(!dir.isNull() && dir != ".")
|
||||
Option::output_dir = dir;
|
||||
if(QDir::isRelativePath(Option::output_dir))
|
||||
|
Loading…
x
Reference in New Issue
Block a user