title: How can a Qbs build Rule use a product
body: <p>I want to use Qbs to compile an existing project. This project already contains a code-transformation-tool (my_tool) that is used heavily in this project.</p>
  
  <p>So far I have (simplified):</p>
  
  <pre><code>import qbs 1.0
  
  Project {
      Application {
          name: "my_tool"
          files: "my_tool/main.cpp"
          Depends { name: "cpp" }
      }
  
      Application {
          name: "my_app"
          Group {
              files: 'main.cpp.in'
              fileTags: ['cpp_in']
          }
          Depends { name: "cpp" }
  
          Rule {
              inputs: ["cpp_in"]
              Artifact {
                  fileName: input.baseName
                  fileTags: "cpp"
              }
              prepare: {
  
                  var mytool = /* Reference to my_tool */;
  
                  var cmd = new Command(mytool, input.fileName, output.fileName);
                  cmd.description = "Generate\t" + input.baseName;
                  cmd.highlight = "codegen";
                  return cmd;
              }
          }
      }
  }
  </code></pre>
  
  <p>How can I get the reference to my_tool for the command?</p>