I did succeed building your example with tf 0.10rc0 and cmake in my own project.
#1 build shared object library with bazel (//tensorflow:libtensorflow.so)
#2 build(again bazel) and install the pip package (this will provide the includes)
#3 copy some includes to pip package directory (shouldn’t be necessary with new master branch, see https://github.com/tensorflow/tensorflow/issues/3536)
then the following cmake things did do the job:
Hope that helps anybody :P