That specific query doesn't work because includes aren't labels (see
#825 for some discussion). Also, query operators filter the results of the query; you're still only going to get labels out of it. Something like `bazel query --output=proto deps(//path/to:target)` (or XML) will let you extract all of the includes attributes by writing a bit of code if you want to go that route.
However, just extracting includes attributes is not quite enough in general. You also have the various genfiles directories, the source directory itself, includes specified via copts, and possibly additional options from CROSSTOOL or --copt.