The following are required for compilation:
- an ordinary C++ development environment (g++, make, C++ libraries and
  headers, ...)
- cmake (if you want to install the KPart)
- a standard LaTeX environment
- a Qt 5 development environment (libraries, headers, qmake, ...): only
  QtCore, QtGui and QtXml are required, at least in version 5.0
- the poppler-qt5 libraries and headers, at least in version 0.4q
- the following KDE frameworks development environment (only if you want KDE integration
  and the KPart): KDocTools KXmlGui KTextEditor KParts KIconThemes
- the LaTeX pgf package (which includes TikZ)
- the LaTeX preview package

TODO: Add Ubuntu dependencies (Ubuntu 18.04)
In Ubuntu 18.04 LTS you would obtain those by installing the following packages:
- build-essential
- cmake (if you want to install the KDE version)
- qtbase5-dev
- libpoppler-qt5-dev
- libkf5doctools-dev, libkf5xmlgui-dev, libkf5texteditor-dev, libkf5parts-dev, libkf5iconthemes-dev
- pgf
- preview-latex-style
- extra-cmake-modules

Install the Qt-only (qtikz) application (using qmake):
------------------------------------------------------

1. Edit the paths in qmake/ q.pri
2. Run the following commands (this will create an executable named qtikz):
  mkdir buildqt
  cd buildqt
  qmake ../qtikz.pro
  make
  sudo make install
  sudo update-mime-database /usr/share/mime

Note that qmake will tell you where the files will be installed. If
you don't like the installation directories, you can change them in
the file qmake/qtikzconfig.pri before running make.  Make sure to make
the changes in qmake/qtikzconfig.pri before running make.

In order to uninstall qtikz run the following commands in the build directory:
  sudo make uninstall
  sudo update-mime-database /usr/share/mime

Install the KDE (ktikz) application and the KPart (using cmake):
----------------------------------------------------------------

Run the following commands (this will create an executable named ktikz
and a KPart which will be loaded when clicking a *.pgf or *.tikz file
in Konqueror):
  mkdir build
  cd build
  cmake ..
  make
  sudo make install

Because a new mimetype (text/x-pgf) is added to the system, as a user one
may additionally have to run
  kbuildsycoca4
or restart KDE so that konqueror uses the KPart for this mimetype.

In order to uninstall ktikz run the following commands in the build directory
(the path in the last command depends of course on where the mimetype was
installed, see the output of the make uninstall command for the correct path):
  sudo make uninstall
  sudo update-mime-database /usr/share/mime

You may additionally run the following command to remove the installation
directories created during "make install" (WARNING: this will also remove
the directories if they are not empty, use at your own risk):
  sudo make uninstalldirs
