summaryrefslogtreecommitdiff
path: root/qmake
Side-by-side diff
Diffstat (limited to 'qmake') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/project.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index ae24193..96cdad8 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -443,7 +443,5 @@ QMakeProject::read(QString project, QString)
/* prefer $QTDIR if it is set */
- /* minor hack here, prefer QMAKESPECDIR -cl */
+ /* prefer QMAKESPECSDIR -cl */
- if (getenv("QMAKESPECDIR")){
- mkspec_roots << getenv("QMAKESPECDIR");
- } else if (getenv("QTDIR")) {
+ if (getenv("QTDIR")) {
mkspec_roots << getenv("QTDIR");
@@ -451,2 +449,10 @@ QMakeProject::read(QString project, QString)
mkspec_roots << qInstallPathData();
+
+ if (getenv("QMAKESPECSDIR")){
+ QString mkspec = QString(getenv("QMAKESPECSDIR")) + QDir::separator() +
+ QDir::separator() + "default";
+ if(QFile::exists(mkspec))
+ Option::mkfile::qmakespec = mkspec;
+ }
+
if(Option::mkfile::qmakespec.isEmpty()) {
@@ -460,6 +466,7 @@ QMakeProject::read(QString project, QString)
}
- if(Option::mkfile::qmakespec.isEmpty()) {
- fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
- return FALSE;
- }
+ }
+
+ if(Option::mkfile::qmakespec.isEmpty()) {
+ fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
+ return FALSE;
}