/**
\page BuildInstructionsPage Build Instructions

\tableofcontents

\section BuildInstructions_Introduction Introduction

MITK uses a CMake-based <b>superbuild</b> system.
The superbuild downloads and builds almost all required third-party libraries before building MITK itself.

This page explains how to configure and use the MITK superbuild.

\section BuildInstructions_Prerequisites Prerequisites

You need the following software:

  -# <a href="https://git-scm.com/">Git</a>
  -# <a href="https://cmake.org/">CMake</a> (version \minimumCMakeVersion or later; CMake 4 is not yet supported)
  -# <a href="https://www.qt.io/">Qt</a> (version \minimumQt6Version or later; see below)
  -# <a href="https://www.doxygen.nl/">Doxygen</a> (version 1.9; Doxygen 1.10 and later are not yet supported)
  -# <a href="https://graphviz.org/">GraphViz</a>

\subsection Linux

On Linux, install the following packages including Git, Doxygen, and GraphViz as mentioned above (example for Ubuntu using APT):

\code{.unparsed}
sudo apt install bison build-essential doxygen git graphviz \
  libegl-dev libfreetype6-dev libglu1-mesa-dev libopengl-dev \
  libpcre2-dev libssl-dev libtiff5-dev libxcomposite1 libxcursor-dev \
  libxcb-cursor-dev libxdamage-dev libxi-dev libxcb-icccm4 \
  libxcb-keysyms1 libxcb-shape0 libxkbcommon-dev libxkbcommon-x11-0 \
  libxkbfile1 libxrandr2 libxtst6 libxt-dev mesa-common-dev
\endcode

\subsection Windows

On Windows, install <b>Visual Studio 2022</b> with the <b>Desktop development with C++</b> workload.

You also need an OpenSSL version that matches the OpenSSL dependency of MITK’s Python package.
Currently, this is <b>OpenSSL \requiredOpenSSLVersion</b>.
We recommend using the builds provided by
<a href="https://slproweb.com/products/Win32OpenSSL.html">Shining Light Productions</a>.

\subsection macOS

On macOS, install the Command Line Tools (they provide the required compilers and SDKs):

\code{.unparsed}
xcode-select --install
\endcode

Then install the following packages, for example via Homebrew:

\code{.unparsed}
brew install freetype graphviz libomp openssl@3 swig
\endcode

Note: Because of known incompatibilities, OpenMP is disabled on macOS when <tt>MITK_USE_Python3</tt> is enabled (default), though.

\subsection BuildInstructions_Qt Qt

MITK does not provide Qt as part of its superbuild. You must install Qt manually.
The Qt Group provides installers for all supported platforms:

<a href="https://www.qt.io/download/">https://www.qt.io/download/</a>

We highly recommend installing Qt to the <b>default location</b>, so CMake can find it automatically.

In the Qt installer, make sure to select the following <b>additional libraries</b>:

  - Qt 5 Compatibility Module
  - Qt State Machines
  - Qt WebEngine (see note below)
  - Qt WebChannel (Qt 6.8 and later)
  - Qt Positioning (Qt 6.8 and later)

Note: Starting with Qt 6.8, Qt WebEngine is no longer listed under "Additional Libraries".
It is now located under "Extensions > Qt WebEngine".

\section BuildInstructions_Build_With_CMake Build MITK with CMake

With all prerequisites installed and using standard/default settings, building MITK with CMake is straightforward.

<b>Linux or macOS:</b>

\code{.unparsed}
git clone https://github.com/MITK/MITK.git
cmake -S MITK -B MITK-superbuild -G "Unix Makefiles"
cmake --build MITK-superbuild -- -j6
\endcode

<b>Windows:</b>

\code{.unparsed}
git clone https://github.com/MITK/MITK.git
cmake -S MITK -B MITK-superbuild -G "Visual Studio 17 2022"
cmake --build MITK-superbuild -- -m
\endcode

\section BuildInstructions_Superbuild_Note A note on the MITK superbuild

The MITK superbuild has the major advantage that most of MITK’s dependencies are built automatically and do not need to be provided manually.
The trade-off is that it requires a short introduction to understand how the superbuild concept works.

The superbuild compiles not only all dependencies, but also MITK itself as the final step.

When developing with MITK, and as long as no dependencies are changed or updated, it is sufficient to
continuously build only MITK.
There is no need to run the superbuild again and again.

Here is the crucial point from a CMake perspective:
Both the superbuild and the MITK build **share the same source directory**.
The only difference is the **build directory**, for example:

- Superbuild: <tt>/path/to/MITK-superbuild</tt>
- MITK build (inside the superbuild): <tt>/path/to/MITK-superbuild/MITK-build</tt>

Once the superbuild has finished, you usually switch the build directory in CMake to the <tt>MITK-build</tt> directory.
This reveals an entirely different set of CMake options, now specific to building MITK itself.
*/
