From f0a97cb158bef2656bbb8e1dafe072af7ff9c596 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 18 Dec 2022 16:47:30 +0200 Subject: [PATCH 1/1] Emit include path in vcxproj files --- source/vcxprojectgenerator.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/source/vcxprojectgenerator.cpp b/source/vcxprojectgenerator.cpp index c5df4d5..871cde9 100644 --- a/source/vcxprojectgenerator.cpp +++ b/source/vcxprojectgenerator.cpp @@ -90,9 +90,17 @@ void VcxProjectGenerator::Worker::main() vector sources; vector includes; vector others; + BuildInfo build_info; for(BuildGraph::TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i) - if(i->second->get_package()==&spkg && !i->second->is_buildable()) - if(const FileTarget *file = dynamic_cast(i->second)) + if(i->second->get_package()==&spkg) + { + if(i->second->is_buildable()) + { + BuildInfo tgt_binfo; + i->second->collect_build_info(tgt_binfo); + build_info.update_from(tgt_binfo, BuildInfo::CHAINED); + } + else if(const FileTarget *file = dynamic_cast(i->second)) { if(dynamic_cast(file)) { @@ -105,6 +113,17 @@ void VcxProjectGenerator::Worker::main() else others.push_back(file); } + } + + if(!build_info.incpath.empty()) + { + IO::print(out, "\t\n"); + string path_str; + for(BuildInfo::PathList::const_iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i) + append(path_str, ";", i->str()); + IO::print(out, "\t\t%s\n", path_str); + IO::print(out, "\t\n"); + } IO::print(out, "\t\n"); for(vector::const_iterator i=sources.begin(); i!=sources.end(); ++i) -- 2.45.2