title: No rule to make target with Cmake protobuf
body: <p>I am trying to get Cmake to compile my protofiles. I use the following CMakeLists.txt for that.</p>
  
  <pre><code>include(FindProtobuf)
  find_package(Protobuf REQUIRED)
  # check if protobuf was found
  if(PROTOBUF_FOUND)
      message ("protobuf found")
  else()
      message (FATAL_ERROR "Cannot find Protobuf")
  endif()
  
  include_directories(${PROTOBUF_INCLUDE_DIR})
  message(${PROTOBUF_INCLUDE_DIR})
  
  set(PROTO_FILES
      msg.proto)
  
  PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER ${PROTO_FILES})
  
  message ("PROTO_SRC = ${PROTO_SRC}")
  message ("PROTO_HEADER = ${PROTO_HEADER}")
  
  add_library(proto ${PROTO_HEADER} ${PROTO_SRC})
  </code></pre>
  
  <p>My folder structure:</p>
  
  <pre><code>cpp/
    protos
      msg.proto
      CMakeLists.txt
    build
      debug
  </code></pre>
  
  <p>I build from build/debug. Protobuf is found. For Proto_src and Proto_header I find:</p>
  
  <pre><code>PROTO_SRC = /home/mike/code/protos/cpp/build/debug/protos/msg.pb.cc
  PROTO_HEADER = /home/mike/code/protos/cpp/build/debug/protos/msg.pb.h
  </code></pre>
  
  <p>but then when trying to compile I get the following error:</p>
  
  <pre><code>make[2]: *** No rule to make target '../../protos/msg.proto', needed by 'protos/msg.pb.h'.  Stop.
  </code></pre>
  
  <p>I got the setup from <a href="https://github.com/shaochuan/cmake-protobuf-example" rel="nofollow noreferrer">https://github.com/shaochuan/cmake-protobuf-example</a></p>
  
  <p>I don't see what I am missing here?</p>