title: CImg X11 Linking Error using CLion and CMake
body: <p>I have a C++ project in CLion (Ubuntu) that uses the CImg library.  Currently, I cannot get the project to build properly.  I have included the CImg.h file in my main.cpp file.  I get an output like seen <a href="https://stackoverflow.com/questions/33327727/cimg-library-linking-error">here</a>.  I made sure I had X11 tools installed by running the following command in the terminal:</p>
  
  <pre><code>sudo apt-get install libx11-dev
  </code></pre>
  
  <p>In the question linked to above, there is an answer that states to add the following compiler options:</p>
  
  <pre><code>-L/usr/X11R6/lib -lm -lpthread -lX11
  </code></pre>
  
  <p>However, I run into 2 problems with this. First, I am using CMake in CLion, not the command window, so I am not sure how to use this command (assuming it works).  Secondly, the path specified above does not seem to exist on my computer - there is no X11R6 folder within /usr. Therefore, how can I properly link the required X11 libraries so I may begin to use CImg?</p>
  
  <p>(Also, I don't know if this is relevant, but I do not have Magick++ installed.)</p>