title: How to add qcustomplot to cmakelists.txt?
body: <p>Hello I'm code newbie.</p>
  <p>Now I am trying to add qcustomplot using qt designer from class.</p>
  <p>ui works fine before I add qcustomplot to .ui.</p>
  <p>But the moment I add qcustomplot to the widget in the UI I get the error.</p>
  <p>I'm working on ubuntu20.04 right now</p>
  <p>Is there a way to add qcustomplot in qt designer from class?</p>
  <pre><code>cmake_minimum_required(VERSION 3.0.2)
  project(simulation_test)
  
  add_compile_options(-std=c++14)
  
  set(EXTERNAL_DEPENDS
    Qt5Widgets
    Qt5PrintSupport
    Qt5Core
    )
  
  set(EXTERNAL_DEPENDS_LIB
    Qt5::Widgets
    Qt5::PrintSupport
    Qt5::Core
    )
  
  set(CMAKE_INCLUDE_CURRENT_DIR ON)
  
  foreach(DEPEND ${EXTERNAL_DEPENDS})
    find_package(${DEPEND} REQUIRED)
  endforeach(DEPEND)
  
  find_package(Qt5Core REQUIRED)
  find_package(Qt5Widgets REQUIRED)
  find_package(Qt5PrintSupport REQUIRED)
  
  catkin_package(
    INCLUDE_DIRS
      include
    LIBRARIES
      ${PROJECT_NAME}
    CATKIN_DEPENDS
      ${ROS_DEPENDS}
    DEPENDS
      ${EXTERNAL_DEPENDS}
  )
  
  include_directories(
      include
    ${catkin_INCLUDE_DIRS} 
    ${src} ${INCLUDE_DIRECTORIES}
    )
  
  
  file(GLOB HDRS
    &quot;/src/Gui/*.h&quot;
  )
  
  file(GLOB SRCS
    &quot;/src/Gui/*.cpp&quot;
    &quot;/src/Gui/*.hpp&quot;
  ) 
  
  set(CMAKE_AUTOMOC ON)
  set(CMAKE_AUTORCC ON)
  set(CMAKE_AUTOUIC ON)
  
  
  file(GLOB_RECURSE UI
      &quot;/src/Gui/*.ui&quot;
  )
  
  qt5_wrap_ui (UI_HDRS  ${UI})
  
  add_executable(simulation_test_Gui src/Gui/test.cpp 
  ${HDRS} ${SRCS} ${UI})
  
  target_include_directories (simulation_test_Gui 
  PUBLIC $&lt;BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}
  qcustomplot-source&gt; $&lt;INSTALL_INTERFACE:
  ${CMAKE_INSTALL_PREFIX}/src/Gui&gt;$&lt;BUILD_INTERFACE:
  ${PROJECT_SOURCE_DIR}/src/Gui&gt;)
  
  target_include_directories(simulation_test_Gui PUBLIC 
  ${CMAKE_CURRENT_LIST_DIR})
  target_link_libraries(simulation_test_Gui PUBLIC 
  Qt5::Widgets Qt5::Core Qt5::Gui  Qt5::PrintSupport)
  </code></pre>
  <p>Error</p>
  <pre><code>CMakeFiles/simulation_test_Gui.dir/src/Gui/test.cpp.o
  :in function `test::test(QWidget*)':
  
  undefined reference to 
  `QCustomPlot::QCustomPlot(QWidget*)'
  
  collect2: error: ld returned 1 exit status
  </code></pre>