X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=plugins%2Fmsvc%2Fvssolutionfile.cpp;fp=plugins%2Fmsvc%2Fvssolutionfile.cpp;h=38908df99ff7c842815db0363330992137328a11;hb=1dc209f3b40259a5ff2ebdc3081e533b9fbc7b52;hp=0000000000000000000000000000000000000000;hpb=3d4ef1b93e8cfd8467efd132cb80ad4bd368f33a;p=builder.git diff --git a/plugins/msvc/vssolutionfile.cpp b/plugins/msvc/vssolutionfile.cpp new file mode 100644 index 0000000..38908df --- /dev/null +++ b/plugins/msvc/vssolutionfile.cpp @@ -0,0 +1,31 @@ +#include +#include +#include +#include "vssolutionfile.h" + +using namespace std; +using namespace Msp; + +VsSolutionFile::VsSolutionFile(Builder &b, const SourcePackage &p): + FileTarget(b, p, p.get_source_directory()/(p.get_name()+".sln")) +{ + tool = &builder.get_toolchain().get_tool("VSSG"); +} + +void VsSolutionFile::find_dependencies() +{ + find_dependencies(*package); +} + +void VsSolutionFile::find_dependencies(const SourcePackage &spkg) +{ + if(FileTarget *project = builder.get_vfs().get_target(spkg.get_source_directory()/(spkg.get_name()+".vcxproj"))) + if(!any_equals(depends, static_cast(project))) + { + add_dependency(*project); + + for(const Package *r: spkg.get_required_packages()) + if(const SourcePackage *s = dynamic_cast(r)) + find_dependencies(*s); + } +}