title: Errors while building with QWT
body: <p>I get an error</p>
  
  <pre><code>undefined reference to `QwtPlot::QwtPlot(QWidget*)'
  </code></pre>
  
  <p>when I try to build my project even though everything seems fine in the setup.</p>
  
  <p>In my CmakeLists.txt I have </p>
  
  <pre><code>include_directories(
    [...]
    ${QWT_INCLUDE_DIR})
  </code></pre>
  
  <p>which points to where I have my Qwt headers
  and </p>
  
  <pre><code>find_package(Qwt REQUIRED)
  </code></pre>
  
  <p>works because QWT_FOUND is set to True</p>
  
  <p>Here's my FindQwt.cmake:</p>
  
  <pre><code>#MESSAGE("Searching for QWT")
  FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
    /usr/include
    /usr/local/include
    "$ENV{LIB_DIR}/include" 
    "$ENV{INCLUDE}" 
    PATH_SUFFIXES qwt-qt4 qwt
    )
  
  FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt5 qwt-qt4 qwt5-qt4 PATHS 
    /usr/lib
    /usr/local/lib
    "$ENV{LIB_DIR}/lib" 
    "$ENV{LIB}/lib" 
    )
  
  IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
    SET(QWT_FOUND TRUE)
  ENDIF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
  
  IF (QWT_FOUND)
    IF (NOT QWT_FIND_QUIETLY)
      MESSAGE(STATUS "Found QWT: ${QWT_LIBRARY}")
    ENDIF (NOT QWT_FIND_QUIETLY)
  ELSE (QWT_FOUND)
    IF (QWT_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find QWT")
    ENDIF (QWT_FIND_REQUIRED)
  ENDIF (QWT_FOUND)
  </code></pre>
  
  <p>Using message to print ${QWT_INCLUDE_DIR} points to qwt_plot.h, which has  QwtPlot::QwtPlot(QWidget*) defined, so I'm not sure what I could be missing.</p>