title: How can I package the installed files in CMAKE
body: <p>I install some files into a folder with CMake <code>Install</code> command. Then I want to package the folder into a <code>zip</code> or <code>tar</code>. How can i do it in cmake. I mean thar after executing the <code>make install</code> I can also get the zip file</p>
  
  <p>PS：
  I have tried </p>
  
  <pre><code>install(CODE "execute_process(COMMAND tar -cf ${CMAKE_PROJECT_NAME}.tar ${CMAKE_PROJECT_NAME}
                                WORKING_DIRECTORY ${CMAKE_BINARY_DIR})")
  </code></pre>
  
  <p><strong>But the install order of CMake is undefined across different directories</strong> </p>