From 7e9cf4a4b3e04e4268e6920aef263a85b5b3de70 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 15 Feb 2010 21:18:11 +0100 Subject: factor out applyHostMode() more preparation work for delayed mode determination ... Reviewed-by: mariusSO --- qmake/option.cpp | 22 +++++++++++++--------- qmake/option.h | 1 + 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 { -- cgit v0.12