summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-15 20:18:11 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-26 13:29:16 (GMT)
commit7e9cf4a4b3e04e4268e6920aef263a85b5b3de70 (patch)
treedf9c899ac51bac0ddc02ac7ed9fac2693814c966 /qmake
parente122289e44318667b74ac42a5f867017845d6a60 (diff)
downloadQt-7e9cf4a4b3e04e4268e6920aef263a85b5b3de70.zip
Qt-7e9cf4a4b3e04e4268e6920aef263a85b5b3de70.tar.gz
Qt-7e9cf4a4b3e04e4268e6920aef263a85b5b3de70.tar.bz2
factor out applyHostMode()
more preparation work for delayed mode determination ... Reviewed-by: mariusSO
Diffstat (limited to 'qmake')
-rw-r--r--qmake/option.cpp22
-rw-r--r--qmake/option.h1
2 files changed, 14 insertions, 9 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 4f6ce5d..9e99ae4 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -525,18 +525,22 @@ Option::init(int argc, char **argv)
}
//defaults for globals
- if(Option::target_mode == Option::TARG_WIN_MODE) {
- Option::dir_sep = "\\";
- Option::obj_ext = ".obj";
- Option::res_ext = ".res";
- } else {
- Option::dir_sep = "/";
- Option::obj_ext = ".o";
- }
- Option::qmake_abslocation = Option::fixPathToTargetOS(Option::qmake_abslocation);
+ applyHostMode();
return QMAKE_CMDLINE_SUCCESS;
}
+void Option::applyHostMode()
+{
+ if (Option::host_mode == Option::HOST_WIN_MODE) {
+ Option::dir_sep = "\\";
+ Option::obj_ext = ".obj";
+ } else {
+ Option::dir_sep = "/";
+ Option::obj_ext = ".o";
+ }
+ Option::qmake_abslocation = Option::fixPathToTargetOS(Option::qmake_abslocation);
+}
+
bool Option::postProcessProject(QMakeProject *project)
{
Option::cpp_ext = project->variables()["QMAKE_EXT_CPP"];
diff --git a/qmake/option.h b/qmake/option.h
index 3ee1743..d9e3c39 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -106,6 +106,7 @@ struct Option
//both of these must be called..
static int init(int argc=0, char **argv=0); //parse cmdline
+ static void applyHostMode();
static bool postProcessProject(QMakeProject *);
enum StringFixFlags {