add Qt Charts library using cmake v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 24 Sep 2018 20:54:50 +0200
branchv_0
changeset 10 a6a036bc3857
parent 9 d88df75dc2eb
child 11 0f42346c8fc7
add Qt Charts library using cmake
nbproject/configurations.xml
src/CMakeLists.txt
--- a/nbproject/configurations.xml	Mon Sep 24 17:35:23 2018 +0200
+++ b/nbproject/configurations.xml	Mon Sep 24 20:54:50 2018 +0200
@@ -90,9 +90,6 @@
       </toolsSet>
       <flagsDictionary>
         <element flagsID="0" commonFlags="-fsanitize=address -fPIC -std=gnu++11"/>
-        <element flagsID="1"
-                 commonFlags="-mtune=generic -march=x86-64 -std=gnu++11 -fsanitize=address -fPIC -fstack-protector-strong"/>
-        <element flagsID="2" commonFlags="-std=c++14"/>
       </flagsDictionary>
       <codeAssistance>
       </codeAssistance>
@@ -102,6 +99,27 @@
           <buildCommand>${MAKE} -f Makefile</buildCommand>
           <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
           <executablePath>build/Debug/src/relpipe-out-chart</executablePath>
+          <ccTool>
+            <incDir>
+              <pElem>build/Debug/src</pElem>
+              <pElem>src</pElem>
+              <pElem>build/Debug/src/relpipe-out-chart_autogen/include</pElem>
+              <pElem>../relpipe-lib-reader.cpp/include</pElem>
+              <pElem>../relpipe-lib-cli.cpp/include</pElem>
+              <pElem>/usr/include/x86_64-linux-gnu/qt5</pElem>
+              <pElem>/usr/include/x86_64-linux-gnu/qt5/QtWidgets</pElem>
+              <pElem>/usr/include/x86_64-linux-gnu/qt5/QtGui</pElem>
+              <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCore</pElem>
+              <pElem>/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++</pElem>
+              <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCharts</pElem>
+            </incDir>
+            <preprocessorList>
+              <Elem>QT_CHARTS_LIB</Elem>
+              <Elem>QT_CORE_LIB</Elem>
+              <Elem>QT_GUI_LIB</Elem>
+              <Elem>QT_WIDGETS_LIB</Elem>
+            </preprocessorList>
+          </ccTool>
         </makeTool>
         <preBuild>
           <preBuildCommandWorkingDir>build/Debug</preBuildCommandWorkingDir>
@@ -113,8 +131,6 @@
             ex="false"
             tool="1"
             flavor2="11">
-        <ccTool flags="2">
-        </ccTool>
       </item>
       <item path="build/Debug/src/relpipe-out-chart_autogen/EWIEGA46WW/moc_RelpipeChartMainWindow.cpp"
             ex="true"
@@ -125,85 +141,22 @@
             ex="false"
             tool="1"
             flavor2="8">
-        <ccTool flags="1">
+        <ccTool flags="0">
         </ccTool>
       </item>
-      <folder path="0">
-        <ccTool>
-          <incDir>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCore</pElem>
-          </incDir>
-        </ccTool>
-      </folder>
       <folder path="Modules">
         <ccTool>
           <incDir>
-            <pElem>build/Debug/src</pElem>
-            <pElem>src</pElem>
-            <pElem>build/Debug/src/relpipe-out-chart_autogen/include</pElem>
-            <pElem>../relpipe-lib-reader.cpp/include</pElem>
-            <pElem>../relpipe-lib-cli.cpp/include</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtWidgets</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtGui</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCore</pElem>
-            <pElem>/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++</pElem>
             <pElem>/usr/include</pElem>
           </incDir>
-          <preprocessorList>
-            <Elem>QT_CORE_LIB</Elem>
-            <Elem>QT_GUI_LIB</Elem>
-            <Elem>QT_WIDGETS_LIB</Elem>
-          </preprocessorList>
-        </ccTool>
-      </folder>
-      <folder path="relpipe-out-chart_autogen">
-        <ccTool>
-          <incDir>
-            <pElem>build/Debug/src/relpipe-out-chart_autogen/EWIEGA46WW</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCore</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtGui</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtWidgets</pElem>
-            <pElem>build/Debug/src/relpipe-out-chart_autogen/include</pElem>
-            <pElem>src</pElem>
-            <pElem>build/Debug/src/relpipe-out-chart_autogen</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5</pElem>
-            <pElem>build/Debug/src</pElem>
-          </incDir>
         </ccTool>
       </folder>
       <item path="src/RelpipeChartMainWindow.cpp" ex="false" tool="1" flavor2="8">
-        <ccTool flags="1">
-          <incDir>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCore</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtWidgets</pElem>
-            <pElem>build/Debug/src/relpipe-out-chart_autogen/include</pElem>
-            <pElem>src</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtGui</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5</pElem>
-            <pElem>build/Debug/src</pElem>
-          </incDir>
+        <ccTool flags="0">
         </ccTool>
       </item>
       <item path="src/relpipe-out-chart.cpp" ex="false" tool="1" flavor2="8">
         <ccTool flags="0">
-          <incDir>
-            <pElem>build/Debug/src</pElem>
-            <pElem>src</pElem>
-            <pElem>build/Debug/src/relpipe-out-chart_autogen/include</pElem>
-            <pElem>../relpipe-lib-reader.cpp/include</pElem>
-            <pElem>../relpipe-lib-cli.cpp/include</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtWidgets</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtGui</pElem>
-            <pElem>/usr/include/x86_64-linux-gnu/qt5/QtCore</pElem>
-            <pElem>/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++</pElem>
-          </incDir>
-          <preprocessorList>
-            <Elem>QT_CORE_LIB</Elem>
-            <Elem>QT_GUI_LIB</Elem>
-            <Elem>QT_WIDGETS_LIB</Elem>
-          </preprocessorList>
         </ccTool>
       </item>
     </conf>
--- a/src/CMakeLists.txt	Mon Sep 24 17:35:23 2018 +0200
+++ b/src/CMakeLists.txt	Mon Sep 24 20:54:50 2018 +0200
@@ -5,6 +5,7 @@
 set(CMAKE_AUTOMOC ON) # Instruct CMake to run moc automatically when needed
 set(CMAKE_AUTOUIC ON) # Create code from a list of Qt designer ui files
 find_package(Qt5Widgets CONFIG REQUIRED) # Find the QtWidgets library
+find_package(Qt5Charts CONFIG REQUIRED)
 
 # Relpipe libraries:
 INCLUDE(FindPkgConfig)
@@ -28,6 +29,7 @@
 # Link libraries:
 target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIB_READER_LIBRARIES})
 target_link_libraries(${EXECUTABLE_FILE} Qt5::Widgets)
+target_link_libraries(${EXECUTABLE_FILE} Qt5::Charts)
 
 
 # Print all variables: