diff options
Diffstat (limited to 'Builder.cpp')
-rw-r--r-- | Builder.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Builder.cpp b/Builder.cpp index 74fbcdf..6fd4f3c 100644 --- a/Builder.cpp +++ b/Builder.cpp @@ -298,8 +298,12 @@ std::unordered_map<fs::path, std::vector<fs::path>> Builder::get_dependencies(co for (const auto& element: ptree.get_child(topelement)) { if (is_match(element, _target)) { // add target - fs::path target{get_target(element.second)}; - dependencies.emplace(target, get_objects(element.second)); + const pt::ptree& list{element.second}; + fs::path target{get_target(list)}; + std::vector<fs::path> deps{get_objects(list)}; + std::vector<fs::path> link_libs{link_libs_of(target)}; + std::copy(link_libs.begin(), link_libs.end(), std::back_inserter(deps)); + dependencies.emplace(target, deps); // add dynamic lib links if (is_dynamic_lib(target)) { @@ -309,7 +313,7 @@ std::unordered_map<fs::path, std::vector<fs::path>> Builder::get_dependencies(co if (include_sources) { // add source dependencies of *.o - std::vector<fs::path> sources{get_sources(element.second)}; + std::vector<fs::path> sources{get_sources(list)}; for (const auto& p: sources) { fs::path p_obj{p}; p_obj.replace_extension("o"); |