title: CMake: add dependency to IMPORTED library
body: <p>I have a vendor supplied library archive which I have imported into my project:</p>
  
  <pre><code>add_library(
      lib_foo 
      STATIC 
      IMPORTED GLOBAL
      )
  
  set_target_properties(
      lib_foo 
      PROPERTIES IMPORTED_LOCATION             
      "${CMAKE_CURRENT_LIST_DIR}/vendor/foo.a"
      )
  
  set_target_properties(
      lib_foo 
      PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 
      "${CMAKE_CURRENT_LIST_DIR}/vendor"
      )
  </code></pre>
  
  <p>When I try to link an application using this library, I get <code>undefined reference to 'pthread_atfork'</code> linker errors:</p>
  
  <pre><code>/usr/lib/libtcmalloc_minimal.a(libtcmalloc_minimal_internal_la-static_vars.o):
      In function `SetupAtForkLocksHandler':
      /tmp/gperftools-2.4/src/static_vars.cc:119: 
          undefined reference to `pthread_atfork'
          ../vendor/foo.a(platformLib.o): In function `foo::Thread::Impl::join()':
  </code></pre>
  
  <p>So <code>vendor/foo.a</code> has a dependency on <code>pthread</code>.</p>
  
  <p>I tried <code>target_link_libraries(lib_foo pthread)</code> but that doesn't work because <code>lib_foo</code> is an <em>IMPORTED</em> target, rather than a built target </p>
  
  <blockquote>
  <pre><code>CMake Error at libfoo/CMakeLists.txt:41 (target_link_libraries):
    Attempt to add link library "pthread" to target "lib_foo"
    which is not built in this directory.
  </code></pre>
  </blockquote>
  
  <h2>Question:</h2>
  
  <p><strong>How do I link <code>pthread</code> to <code>lib_foo</code>, or specify that targets with a dependency on <code>lib_foo</code> also have a dependency on pthread?</strong></p>