#include "gamesetupgenerator.h"
#include <msp/builder/builder.h>
#include <msp/fs/utils.h>
+#include <msp/strings/utils.h>
#include "gamesetupdefinitions.h"
using namespace std;
GameSetupDefinitions &defs = dynamic_cast<GameSetupDefinitions &>(*sources.front());
const Component &comp = *defs.get_component();
- const SourcePackage &spkg = comp.get_package();
- FS::Path dir = spkg.get_temp_directory()/"generated";
- dir /= FS::dirname(FS::relative(defs.get_path(), spkg.get_source_directory()));
+ string subdir = join(string("generated"), "_", comp.flatten_source_path(FS::dirname(defs.get_path())));
+ FS::Path dir = comp.get_temp_directory()/subdir;
Tool &compiler = builder.get_toolchain().get_tool("CC");
string base = FS::basepart(FS::basename(defs.get_path()));