title: How to include external libraries in CMakeLists?
body: <p>I have been trying to build my project with CMakeLists for a couple of days now with some success but I'm not sure on what it is exactly that I am doing. </p>
  
  <p>I am currently using 5 external libraries. (Assimp, glew, glfw, glm, DevIL)
  And my main platform is windows but platform independence is a big plus.</p>
  
  <p>So the question I have is how to proceed when I want to include an external library to my project?</p>
  
  <p>This is what I think I know so far.</p>
  
  <p>(1) If you are "lucky" you can just use find_library and link it with target_link_libraries you are good to go.</p>
  
  <p>(2) Since glm is a header only library, all I need is an include_directories.</p>
  
  <p>(3) If the external library has its own CMakeLists, you do add_subdirectory and set include_directories to where the header files are.</p>
  
  <p>This is what I know I don't understand.</p>
  
  <p>(4) If the external library has .h files and .cpp files but no CMakeLists. How do I include (and build?) this library?</p>
  
  <p>(5) (This is the most important question for me!) If the external library has .h files and either .lib or .dll files, how do I include this library? In both cases! (lib/dll)</p>
  
  <p>Thanks in advance for any and all replies!</p>
  
  <p>Best regards
  Edvin</p>