Skip to content

Commit

Permalink
Fix issue with autodetected Qt path is not sometimes propagated to ot…
Browse files Browse the repository at this point in the history
…her probes.
  • Loading branch information
michaelvlach committed Jul 6, 2018
1 parent 9c0ac1f commit c0458c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .autoproject/autoproject.qbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import qbs
import qbs.Environment
import qbs.File
import qbs.FileInfo
import qbs.TextFile
Expand Down Expand Up @@ -147,7 +148,8 @@ Project
property string cppHeadersPattern: parent.headers
property string cppStandardHeadersPath: parent.standardHeadersPath
property var items: parent.items
property var modules: parent.modules
property var configurationModules: parent.modules
property var modules: ({})
property string rootPath: ""
property string outPath: ""
property string cppPattern: ""
Expand Down Expand Up @@ -176,7 +178,7 @@ Project

function detectQt()
{
if(modules.Qt && modules.Qt.includePath == "")
if(configurationModules.Qt && configurationModules.Qt.includePath == "")
{
var qtPath = targetOS.contains("windows") ? "C:/Qt/" : Environment.getEnv("HOME") + "/Qt/";
var qtVer = File.directoryEntries(qtPath, File.Dirs | File.NoDotAndDotDot)[0];
Expand All @@ -194,6 +196,7 @@ Project
var out = functions.makePath(sourceDirectory, autoprojectDirectory);
var cpp = cppSourcesPattern + "|" + cppHeadersPattern;
detectStandardHeaders();
modules = configurationModules;
detectQt();
rootPath = root;
outPath = out;
Expand Down
1 change: 0 additions & 1 deletion qbs-autoproject.qbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import qbs
import qbs.Environment
import ".autoproject/autoproject.qbs" as AutoProject

AutoProject
Expand Down

0 comments on commit c0458c5

Please sign in to comment.