title: CMake - linking to library downloaded from ExternalProject_add()
body: <p>I am trying to use ExternalProject_add() to download/install dependencies. It installs fine, but I can't figure out how to actually link the libraries after they are downloaded. </p>
  
  <p>I want to call target_link_libraries() on the library that was just downloaded, but the path to the library will vary by system. </p>
  
  <p>If this were a system dependency, I could just call find_package() - but the packages weren't installed on the default search path. I don't think you can specify a search path for find_package in module mode. </p>
  
  <p>Here's a snippet of my CMakeLists.txt that doesn't work: </p>
  
  <pre><code>ExternalProject_Add(
  protobuf
  URL http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
  CONFIGURE_COMMAND &lt;SOURCE_DIR&gt;/configure --prefix=&lt;INSTALL_DIR&gt;
  PREFIX ${MYPROJ_SOURCE_DIR}/dependencies
  )
  find_package(protobuf REQUIRED)
  set(LIBS ${LIBS} ${PROTOBUF_LIBRARIES})
  target_link_libraries (mybinary ${LIBS})
  </code></pre>