title: how to include qt directories and library with cmake
body: <p>here's my cmake file:</p>
  <pre><code>cmake_minimum_required(VERSION 3.13)
  
  # set the project name
  project(calculateur_interest VERSION 0.01)
  
  # specify the C++ standard
  set(CMAKE_CXX_STANDARD 11)
  set(CMAKE_CXX_STANDARD_REQUIRED True)
  #Qt5
  set(CMAKE_AUTOMOC ON)
  set(CMAKE_AUTORCC ON)
  set(CMAKE_AUTOUIC ON)
  #set(CMAKE_POSITION_INDEPENDENT_CODE ON)
  
  set(src main.cpp;
          graph.cpp;
          mainwindow.cpp;
          resultat.cpp;
          mainwindow.ui;
          graph.ui;
          resultat.ui;
          )
  
  add_library(source STATIC ${src} )
  
  find_package(Qt5Core REQUIRED)
  find_package(Qt5Widgets REQUIRED)
  find_package(Qt5Charts REQUIRED)
  
  include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  INCLUDE_DIRECTORIES(&quot;/usr/include/x86_64-linux-gnu/qt5/QtCharts&quot;)
  
  
  add_executable(calc_int ${src})
  target_link_libraries(calc_int Qt5::Widgets Qt5::Charts Qt5::Core)
  </code></pre>
  <p>after generating the MAKEFILE with cmake , i get this error:</p>
  <pre><code>64%] Building CXX object CMakeFiles/source.dir/source_autogen/mocs_compilation.cpp.o
  In file included from /home/pat/calculateur_interest/graph.h:5,
                   from /home/pat/calculateur_interest/build/source_autogen/EWIEGA46WW/moc_graph.cpp:9,
                   from /home/pat/calculateur_interest/build/source_autogen/mocs_compilation.cpp:2:
  /usr/include/x86_64-linux-gnu/qt5/QtCharts/QtCharts:3:10: fatal error: QtCharts/QtChartsDepends: No such file or directory
      3 | #include &lt;QtCharts/QtChartsDepends&gt;
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  make[2]: *** [CMakeFiles/source.dir/build.make:63: CMakeFiles/source.dir/source_autogen/mocs_compilation.cpp.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/source.dir/all] Error 2
  make: *** [Makefile:84: all] Error 2
  </code></pre>
  <p>because of this line :</p>
  <pre><code>INCLUDE_DIRECTORIES(&quot;/usr/include/x86_64-linux-gnu/qt5/QtCharts&quot;)
  </code></pre>
  <p>the compiler is looking in : <code>/usr/include/x86_64-linux-gnu/qt5/QtCharts/QtCharts</code></p>
  <p>instead of : <code>/usr/include/x86_64-linux-gnu/qt5/QtCharts</code></p>
  <p>if i dont put the include_directories i get this error :</p>
  <pre><code>64%] Building CXX object CMakeFiles/source.dir/source_autogen/mocs_compilation.cpp.o
  In file included from /home/pat/calculateur_interest/build/source_autogen/EWIEGA46WW/moc_graph.cpp:9,
                   from /home/pat/calculateur_interest/build/source_autogen/mocs_compilation.cpp:2:
  /home/pat/calculateur_interest/graph.h:5:10: fatal error: QtCharts: No such file or directory
      5 | #include &lt;QtCharts&gt;
        |          ^~~~~~~~~~
  compilation terminated.
  make[2]: *** [CMakeFiles/source.dir/build.make:63: CMakeFiles/source.dir/source_autogen/mocs_compilation.cpp.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/source.dir/all] Error 2
  make: *** [Makefile:84: all] Error 2
  </code></pre>
  <p>looks like iam including the directory the wrong way , i have tried lots of different ways but not the right one yet
  QT-cmake documentation is lacking examples</p>