title: Modifying CMake file to add libpng
body: <p>I have downloaded <a href="http://www.cvlibs.net/download.php?file=libviso2.zip" rel="nofollow"><code>libviso2</code></a> library which comes with <code>CmakeLists.txt</code>.
  To build <code>libviso2</code> with visual studio 11 compiler, It needs <a href="http://gnuwin32.sourceforge.net/packages/libpng.htm" rel="nofollow"><code>libpng</code></a> to be added as dependency in <code>CmakeLists.txt</code>. </p>
  
  <p>Now my question is:</p>
  
  <p>How to modify <code>CMakeLists.txt</code> to add libpng before building my project?</p>
  
  <p><code>CMakeLists.txt</code> is :</p>
  
  <pre><code># project
  cmake_minimum_required (VERSION 2.6)
  project (libviso2)
  
  # directories
  set (LIBVISO2_SRC_DIR src)
  
  # include directory
  include_directories("${LIBVISO2_SRC_DIR}")
  
  # use sse3 instruction set
  SET(CMAKE_CXX_FLAGS "-msse3")
  
  # sources
  FILE(GLOB LIBVISO2_SRC_FILES "src/*.cpp")
  
  # make release version
  set(CMAKE_BUILD_TYPE Release)
  
  # demo program
  add_executable(viso2 ${LIBVISO2_SRC_FILES})
  target_link_libraries (viso2 png)
  </code></pre>