-
Notifications
You must be signed in to change notification settings - Fork 67
GNU Linux Compilation Guide
CaPTk can be built and packaged on Ubuntu 16.04 equivalents and later. 14.04 support works only in the AppImage form (which can be produced on 16.04), as Qt 5.11 depends on a newer version of dbus that 14.04 does not have by default. If you are on another platform and run into an error that looks like:
qt/5.11.2/lib/libQt5WebEngineCore.so.5.11.2: undefined reference to `dbus_message_get_type@LIBDBUS_1_3'
Then try upgrading your version of dbus to the latest.
The current platform with the most support is Ubuntu 16.04. CaPTk can be compiled on later versions, but not previous. In addition, non-Ubuntu derivatives have not been tested to determine if CaPTk can be compiled on them, however CaPTk ships an AppImage installer that will work on older or different distributions.
If you are on Ubuntu 16.04 you can run:
$ sudo apt-get install gcc g++ make libgl-dev cmake
on the commandline. On earlier versions of Ubuntu, libgl-dev is not present and you will need to run:
$ sudo apt-get install -qq gcc g++ make libgl1-mesa-dev cmake
If you are not using an Ubuntu variant, or a Debian-based distribution, make sure that you have the equivalent libraries.
If this is your first time building CaPTk, the superbuild is the best option to pull in the external dependencies (OpenCV, VTK, ITK, Qt). It is assumed that you either downloaded the latest commit over git or extracted the zip file with the CaPTk source.
- Navigate to the root directory of CaPTk (typically the folder where the repository was cloned to)
- Create a build directory and navigate to it:
$ mkdir build && cd build - Run cmake. It will automatically detect that you need a superbuild. This command will also make sure you don't build the docs (Read more about this below):
$ cmake -DBUILD_DOCUMENTATION=OFF .. - Build OpenCV, ITK, and VTK:
$ make(Optionally, if your computer can handle it:$ make -jwill run with multiple threads. This is ideal for CaPTk.) - Repeat step 3 and 4. This time cmake will detect the dependencies and build CaPTk.
If you would like to build the docs with the project, you will need a LaTeX compiler and doxygen. These should be accessible from your package manager:
$ sudo apt-get install texlive doxygen
Then simply run cmake .. from your build directory. Now docs will be built with the project.
CaPTk has it's own automated packaging script, captk-pkg. This script will configure, build, and package CaPTk into an AppImage installer. It can be invoked by navigating to the CaPTk root directory, and running $ ./scripts/captk-pkg.
NOTE: This tool is intended to be used AFTER the superbuild is done!
The AppImage this script provides is able to be used on multiple versions of GNU/Linux, even if they have different kernels, package managers, or software versions.
CaPTk, 2022 | About CaPTk | Please report any issues here