title: How to build with targets with Google Chromium GN?
body: <p>I'm trying to build the executable target for <a href="https://github.com/bayandin/chromedriver" rel="noreferrer">ChromeDriver</a> from source with <a href="https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/quick_start.md" rel="noreferrer">GN</a>, which I installed in a directory on my PATH with <a href="https://www.chromium.org/developers/how-tos/install-depot-tools" rel="noreferrer">Depot Tools</a>, but when I run <code>gn BUILD.gn</code> I'm getting this error:</p>
  
  <pre><code>gn.py: Could not find checkout in any parent of the current path.
  This must be run inside a checkout.
  </code></pre>
  
  <p>I'm not sure if I need to checkout the entire Chromium directory, if I'm not setting this up correctly?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've downloaded a working binary of gn with the help of <a href="https://github.com/cpu-chromium/gn_tool" rel="noreferrer">gn_tool</a>.</p>
  
  <p>I'm still unsure what command I'm supposed to run for "building the chromedriver target", because right now every command I try seems to give me this error:</p>
  
  <pre><code>ERROR Can't find source root. I could not find a ".gn" file in the current directory or any parent,and the --root command-line argument was not specified.
  </code></pre>
  
  <p>...even though there is a BUILD.gn file in the directory where I'm running gn...</p>