title: CMake - How to install(DIRECTORY) in install(TARGETS)?
body: <p>My objective of this code is to copy over a static lib with a folder of includes into another directory.</p>
  
  <p>The new directory will have the structure </p>
  
  <pre><code>output_dir
      ├───include
      ├───lib
           └───win64
  </code></pre>
  
  <p>I have two <code>install</code> lines of CMake code that I  want to reduce to one. First, I install the lib target to <code>output_dir/lib/win64</code> and the <code>include</code> directory to <code>output_dir/include</code>. </p>
  
  <pre><code>add_library(lib STATIC test.cpp )
  
  target_include_directories(lib 
      PUBLIC 
          ${PROJECT_SOURCE_DIR}/include
  )
  
  install(TARGETS lib
      ARCHIVE
          DESTINATION 
              ${PROJECT_SOURCE_DIR}/build/output_dir/lib/win64
  )
  
  install(DIRECTORY
              ${PROJECT_SOURCE_DIR}/include
          DESTINATION
              ${PROJECT_SOURCE_DIR}/build/output_dir/include
  )
  </code></pre>
  
  <p>I'd like to effectively reduce the two install commands to one, here is my best attempt at doing so. The static <code>lib</code>  library gets copied over correctly but the directories get ignored.</p>
  
  <pre><code>install(TARGETS lib
          ARCHIVE
              DESTINATION 
                  ${PROJECT_SOURCE_DIR}/build/output_dir/lib/win64
          PUBLIC_HEADER
              DESTINATION
                  ${PROJECT_SOURCE_DIR}/build/output_dir/
          INCLUDES
              DESTINATION
                  ${PROJECT_SOURCE_DIR}/build/output_dir/     
  )
  </code></pre>
  
  <p>I know the error is with public_header, but what am I doing wrong? </p>