diff options
Diffstat (limited to 'build2/cxx/module.cxx')
-rw-r--r-- | build2/cxx/module.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/build2/cxx/module.cxx b/build2/cxx/module.cxx index 28892cf..caeea9b 100644 --- a/build2/cxx/module.cxx +++ b/build2/cxx/module.cxx @@ -256,6 +256,9 @@ namespace build2 } } + const string& tsys (cast<string> (r["cxx.target.system"])); + const string& tclass (cast<string> (r["cxx.target.class"])); + // Initialize the bin module. Only do this if it hasn't already been // loaded so that we don't overwrite user's bin.* settings. // @@ -274,6 +277,15 @@ namespace build2 info << "cxx.target is " << ct; } + // If our target is MinGW, then we will need the resource compiler + // (windres) in order to embed the manifest. + // + if (tsys == "mingw32") + { + if (!cast_false<bool> (b["bin.rc.loaded"])) + load_module ("bin.rc", r, b, loc, false, bin_hints); + } + // Register target types. // { @@ -329,8 +341,6 @@ namespace build2 r.insert<libso> (perform_install_id, "cxx.install", install::instance); } - - // Configure "installability" of our target types. // using namespace install; @@ -342,8 +352,6 @@ namespace build2 // Create additional target types for certain target platforms. // - const string& tclass (cast<string> (r["cxx.target.class"])); - if (tclass == "windows") { const target_type& dll (b.derive_target_type<file> ("dll").first); |