diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-19 17:10:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-19 17:10:51 +0200 |
commit | 89a9f8174ec858bf6df8515a84f061f211dec551 (patch) | |
tree | 030daad1364ea38a4f2ec22c57b41aeeb8b1b6e8 /build2/cxx/msvc.cxx | |
parent | 3ec07c196c9ab86db09c77bff7eb11cd5a5a9b1e (diff) |
Add import library target libi{}, make libs{} the DLL
In the end, having libs{} be the DLL with import library being its member is
more natural than making libs{} the import library and having dll{} as its
member.
Diffstat (limited to 'build2/cxx/msvc.cxx')
-rw-r--r-- | build2/cxx/msvc.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/build2/cxx/msvc.cxx b/build2/cxx/msvc.cxx index 1c5a3fa..ff91018 100644 --- a/build2/cxx/msvc.cxx +++ b/build2/cxx/msvc.cxx @@ -227,11 +227,24 @@ namespace build2 libs* msvc_search_shared (const path& ld, const dir_path& d, prerequisite& p) { + tracer trace ("cxx::msvc_search_shared"); + libs* r (nullptr); - auto search = [&r, &ld, &d, &p] (const char* pf, const char* sf) -> bool + auto search = [&r, &ld, &d, &p, &trace] ( + const char* pf, const char* sf) -> bool { - r = search_library<libs> (ld, d, p, otype::s, pf, sf); + if (libi* i = search_library<libi> (ld, d, p, otype::s, pf, sf)) + { + r = &targets.insert<libs> (d, dir_path (), p.name, nullptr, trace); + + if (r->member == nullptr) + { + r->mtime (i->mtime ()); + r->member = i; + } + } + return r != nullptr; }; |