X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvcxprojectgenerator.cpp;h=a173829941da9bb0adc18bb2ac103dea9625d354;hb=a557d2ba9aae4a05e4b15c81ba5262da7caac2a5;hp=b5c42c5c2f0ce3715f552996ae47a28e25a49d1a;hpb=84da3f6c94dbe7e36aaf088890fda5fcf3b3efb0;p=builder.git diff --git a/source/vcxprojectgenerator.cpp b/source/vcxprojectgenerator.cpp index b5c42c5..a173829 100644 --- a/source/vcxprojectgenerator.cpp +++ b/source/vcxprojectgenerator.cpp @@ -43,7 +43,7 @@ void VcxProjectGenerator::Worker::main() IO::print(out, "\t\n"); vector build_types = builder.get_build_types(); - const char *platforms[] = { "x86-32", "x86-64", 0 }; + const char *platforms[] = { "Win32", "x64", 0 }; for(const char **i=platforms; *i; ++i) for(vector::const_iterator j=build_types.begin(); j!=build_types.end(); ++j) { @@ -57,6 +57,7 @@ void VcxProjectGenerator::Worker::main() IO::print(out, "\t\n"); IO::print(out, "\t\t15.0\n"); IO::print(out, "\t\tMakeFileProj\n"); + IO::print(out, "\t\t{%s}\n", target.get_guid()); IO::print(out, "\t\n"); IO::print(out, "\t\n"); @@ -69,14 +70,16 @@ void VcxProjectGenerator::Worker::main() exe = dynamic_cast(*i); const char *argv0 = Application::get_argv0(); + const string &toolchain = builder.get_current_arch().get_toolchain(); for(const char **i=platforms; *i; ++i) for(vector::const_iterator j=build_types.begin(); j!=build_types.end(); ++j) { + string base_cmd = format("%s --arch=%s-%s --build-type=%s --prefix=%s", argv0, *i, toolchain, *j, builder.get_prefix()); IO::print(out, "\t\n", *j, *i); IO::print(out, "\t\tMakeFile\n"); - IO::print(out, "\t\t%s --arch=%s --build-type=%s\n", argv0, *i, *j); - IO::print(out, "\t\t%s --arch=%s --build-type=%s -c\n", argv0, *i, *j); - IO::print(out, "\t\t%s --arch=%s --build-type=%s -B\n", argv0, *i, *j); + IO::print(out, "\t\t%s\n", base_cmd); + IO::print(out, "\t\t%s -c\n", base_cmd); + IO::print(out, "\t\t%s -B\n", base_cmd); if(exe) IO::print(out, "\t\t%s\n", exe->get_path()); IO::print(out, "\t\n"); @@ -88,9 +91,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)) { @@ -103,6 +114,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)