title: Trying to find a shared library using CMake
body: <p>I'm trying to find the avformat library for my project using CMake. My first option was to use a <code>FIND_PACKAGE(...)</code> but I couldn't find any CMake Module for it in $CMAKE_ROOT/Modules. Now I'm trying to find it using <code>FIND_LIBRARY(...)</code>.</p>
  
  <p>The library is in <code>/usr/lib/libavformat.so.52</code>.</p>
  
  <p>This is my CMake code for finding it:</p>
  
  <pre><code>find_library(AVFORMAT_LIBRARY avformat PATHS /usr/lib DOC "avformat library")
  if(NOT AVFORMAT_LIBRARY)
      message(FATAL_ERROR "Library avformat required, but not found!")
  endif(NOT AVFORMAT_LIBRARY)
  </code></pre>
  
  <p>However, I can't find it. Why do you think that is?</p>
  
  <p>I could type the specific library name (i.e. <code>libavformat.so.52</code>), but that would tie the code to that specific version, which I wouldn't want.</p>
  
  <p>EDIT: I just tried typing the exact library name <code>libavformat.so.52</code> and that didn't work either. :S</p>
  
  <p>What are your suggestions?</p>
  
  <p>Thank you.</p>