title: How do I build this simple example with Bazel?
body: <p>Suppose I have a project like this: </p>
  
  <pre class="lang-sh prettyprint-override"><code>$ tree . 
  ├── WORKSPACE
  ├── include
  │   └── header.hpp
  └── main.cpp
  └── BUILD.bazel
  </code></pre>
  
  <p>And <code>main.cpp</code> looks like this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include "header.hpp"
  
  int main() {
    return 0;
  }
  </code></pre>
  
  <p>What should my <code>BUILD.bazel</code> file look like?</p>
  
  <p>My current attempt: </p>
  
  <pre class="lang-py prettyprint-override"><code>cc_binary(
    name = "app",
    srcs = [
      "main.cpp",
      "include/header.hpp",
    ],
  )
  </code></pre>
  
  <hr>
  
  <p>Edit: Forgot to mention my <code>WORKSPACE</code> file</p>
  
  <hr>
  
  <p>Edit: Found a work-around, but I don't think it is very elegant: </p>
  
  <pre class="lang-py prettyprint-override"><code>cc_library(
    name = "app-hdrs",
    hdrs = [
      "include/header.hpp",
    ],
    srcs = [
      "include/header.hpp",
    ],
    strip_include_prefix = "include",
  )
  
  cc_binary(
    name = "app",
    srcs = [
      "main.cpp",
    ],
    deps = [
      ":app-hdrs",
    ],
  )
  </code></pre>