title: How to use CPack to pack several cmake build results?
body: <p>As I have to build both static and shared library for x86 and arm platform. So with the same CMakeLists.txt, I have to run it four times with different configuration. I want to use CPack to pack those libraries to one tar file. However, it seems that only the last cmake build results will be included in the tar file.</p>
  
  <p>Is there any idea for this problem?</p>
  
  <p>Here is part of my CMakeLists.txt:</p>
  
  <pre><code>install(FILES api_cpp.h api_c.h  DESTINATION api_lib/include)
  install(TARGETS lib
  ARCHIVE DESTINATION api_lib/${lib_folder}
  LIBRARY DESTINATION api_lib/${lib_folder})
  
  INCLUDE(CPack)
  SET(CPACK_GENERATOR "TGZ")
  </code></pre>