This page explains how to use JKQTPlotter in your own Projects
\tableofcontents
\section BUILDINSTRUCTIONS_QMAKE Build using QMake
\subsection BUILDINSTRUCTIONS_QMAKEINCLUDE QMake Include Project
If you want to simply include the JKQTPlotter Source code into your projects, without build a shared or static library and linking against it, you can use one of these QMake-Include files:
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtplotter.pri">lib/jkqtplotter.pri</a> includes the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText)
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtmathtext.pri">lib/jkqtmathtext.pri</a> includes only JKQTMathText
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtfastplotter.pri">lib/jkqtfastplotter.pri</a> includes only JKQTFastPlotter
.
In your QMake-projects it is then sufficient to add a line like:
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/staticlib/jkqtplotterlib/jkqtplotterlib.pro">staticlib/jkqtplotterlib/jkqtplotterlib.pro</a> builds the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) as static link library
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/staticlib/jkqtmathtextlib/jkqtmathtextlib.pro">staticlib/jkqtmathtextlib/jkqtmathtextlib.pro</a> builds only JKQTMathText as static link library
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/staticlib/jkqtfastplotterlib/jkqtfastplotterlib.pro">staticlib/jkqtfastplotterlib/jkqtfastplotterlib.pro</a> builds only JKQTFastPlotter as static link library
This snippet assumes that you built the libraries with the provided `.PRO`-files. You can also add a second `.pro`-file to your projects, which integrates both as subdirs. Such files are used for all examples in this project. Here is an example:
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/sharedlib/jkqtplotterlib/jkqtplotterlib.pro">sharedlib/jkqtplotterlib/jkqtplotterlib.pro</a> builds the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) as shared library
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro">sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro</a> builds only JKQTMathText as shared library
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro">sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro</a> builds only JKQTFastPlotter as shared library
This snippet assumes that you built the libraries with the provided `.PRO`-files. You can also add a second `.pro`-file to your projects, which integrates both as subdirs. Such files are used for all examples in this project. Here is an example:
# your project file, with declared dependencies on jkqtplotterlib_shared
test_styling.file=$$PWD/test_styling.pro
test_styling.depends = jkqtplotterlib_shared
# add the two entries to SUBDIRS
SUBDIRS += jkqtplotterlib_shared test_styling
\endcode
\note You will have to run a deployment step `make install` before running your executable, so the shared libararies are actually copied to the output directory (see `INSTALLS + ...` above).