-
-
Notifications
You must be signed in to change notification settings - Fork 53
Example build on Linux
Please note that the example is not applicable for distribution's package build. Here ITK will be linked statically. Linux distributions usually have policies to use system's shared libraries (for ITK there will be tons of dependencies).
Requirements
- git
- cmake
- C++ compiler (e.g. GCC)
- make (or other e.g. ninja)
For Linux system's Zlib is used in examples below, for both, ITK and AlizaMS build. This is not a strict requirement. Package name on Debian systems is zlib1g-dev, on Fedora zlib-devel.
Qt 4, 5 or 6 can be used. If Qt is from distribution (look for development packages) nothing special should be done usually, otherwise check Qt web-sites for instructions how to install binary version or build Qt from source. If using custom Qt: set Qt environment, at least PATH to Qt's bin folder with qmake before running cmake for Aliza MS.
Build ITK. Is is also possible to use distribution's ITK development packages (version 4.x.x or 5.x.x) and skip this step. But it is recommended to build locally.
cd $HOME
mkdir itk
cd itk
git clone -b v5.4.4 https://github.com/InsightSoftwareConsortium/ITK
(or download a release, recommended is 5.4.4, don't forget to disable "build testing", it will take longer and take a lot of space)
mkdir build
cd build
cmake -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DITK_USE_SYSTEM_ZLIB:BOOL=ON ../ITK
make
Note: make -jN (N = number or threads) e.g. make -j4 can be used.
Required: set ALIZA_QT_VERSION to Qt major version - 4, 5 or 6. There are more options, it is possible to use cmake-gui to look at the options, here is minimal example
cd $HOME
mkdir alizams
cd alizams
git clone https://github.com/AlizaMedicalImaging/AlizaMS.git
(or download a release and extract)
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DALIZA_QT_VERSION:STRING=5 -DITK_DIR:STRING=$HOME/itk/build -DMDCM_USE_SYSTEM_ZLIB:BOOL=ON ../AlizaMS
make
Note: make -jN (N = number or threads) e.g. make -j4 can be used.