title: Copy or move libs after build with cmake
body: <p>In my project there is a folder that contains third party libraries (google test, zlib, ...). I want to put the libraries in a common folder when all this libraries are built. I'm trying to do this with cmake but I'm having problems. I'm trying this code:</p>
  
  <pre><code>add_subdirectory(gtest-1.6.0)    
  add_custom_command(
              TARGET gtest_main 
              POST_BUILD
              COMMAND ${CMAKE_COMMAND} -E copy ${SRC_LIB_DIR}/*.a ${DST_LIB_DIR})
  </code></pre>
  
  <p>I think the problem could be that the target gtest main in not defined at this level but in a lower level</p>