title: How to build google protobuf environment with cmake on windows?
body: <p>I am following the instructions from:</p>
  
  <p><a href="https://github.com/google/protobuf/tree/master/cmake" rel="nofollow">https://github.com/google/protobuf/tree/master/cmake</a></p>
  
  <pre><code>cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
  -DCMAKE_INSTALL_PREFIX=../../../../install/protobuf ../..
  
  nmake install
  </code></pre>
  
  <p>In my program's CMakeLists.txt i use:</p>
  
  <pre><code>find_package(Protobuf REQUIRED)
  </code></pre>
  
  <p>But it tells me:</p>
  
  <pre><code>-- Could NOT find Protobuf (missing:  Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
  </code></pre>
  
  <p>I think I should set set the environment variable.</p>
  
  <p>Is there a effective way to do this?</p>
  
  <p>in <code>protobuf-master/cmake/install.cmake</code> i can see this:</p>
  
  <pre><code>configure_file(protobuf-config.cmake.in
    ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config.cmake @ONLY)
  configure_file(protobuf-config-version.cmake.in
    ${CMAKE_INSTALL_CMAKEDIR}/protobuf-config-version.cmake @ONLY)
  configure_file(protobuf-module.cmake.in
    ${CMAKE_INSTALL_CMAKEDIR}/protobuf-module.cmake @ONLY)
  configure_file(protobuf-options.cmake
    ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY)
  </code></pre>
  
  <p>Can these files set the environment variable? And how can I use them?</p>