summaryrefslogtreecommitdiffstats
path: root/tools/configure/environment.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-11-01 14:31:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-05 17:17:01 +0100
commit9c2ec72b95c13991f3c62b762783373c3d691337 (patch)
tree31b9ff458251436c77e1cdd89be8aa579ef41d59 /tools/configure/environment.h
parent227accf0a3d1e177ece05d988196510f29240f58 (diff)
Improve path search in configure.
- Remove duplicated code locateFile/locateFileInPaths. - Move basic path search functionality to Environment. - Add functions for headerPaths/libraryPaths to Environment. - Use QStandardPaths::findExecutable(). - Replace Environment::detectExecutable by QStandardPaths::findExecutable(). - Introduce static path lists in findFile() to avoid repeated directory scans Change-Id: I9b93066a3de65f40527780d6ddf7989bca35cd04 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tools/configure/environment.h')
-rw-r--r--tools/configure/environment.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/configure/environment.h b/tools/configure/environment.h
index af4bf4b83a..3818d517b6 100644
--- a/tools/configure/environment.h
+++ b/tools/configure/environment.h
@@ -39,8 +39,7 @@
**
****************************************************************************/
-#include <qstring.h>
-#include <qt_windows.h>
+#include <qstringlist.h>
QT_BEGIN_NAMESPACE
@@ -63,13 +62,20 @@ class Environment
public:
static Compiler detectCompiler();
static QString detectQMakeSpec();
- static bool detectExecutable(const QString &executable);
+ static Compiler compilerFromQMakeSpec(const QString &qmakeSpec);
static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv);
static QString execute(const QString &command, int *returnCode = 0);
static bool cpdir(const QString &srcDir, const QString &destDir);
static bool rmdir(const QString &name);
+ static QString findFileInPaths(const QString &fileName, const QStringList &paths);
+ static QStringList path();
+
+ static QString detectDirectXSdk();
+ static QStringList headerPaths(Compiler compiler);
+ static QStringList libraryPaths(Compiler compiler);
+
private:
static Compiler detectedCompiler;