Building SAIL

This page covers building SAIL from source. Prefer using package managers to install SAIL, see installation.
CMake options overview
  • SAIL_BUILD_APPS=ON|OFF - Build client applications. Default: ON.
  • SAIL_BUILD_EXAMPLES=ON|OFF - Build examples. Default: ON.
  • SAIL_COLORED_OUTPUT=ON|OFF - Enable colored console output on Windows >= 10 and Unix platforms. Default: ON.
  • SAIL_COMBINE_CODECS=ON|OFF - Combine all codecs into a single library. Static build always sets this option to ON. Default: OFF.
  • SAIL_DEV=ON|OFF - Enable developer mode with pedantic warnings and possible ASAN enabled for examples. Default: OFF.
  • SAIL_DISABLE_CODECS="a;b;c" - Disable the codecs specified in this ';'-separated list. One can also specify not just individual codecs but codec groups by their priority like that: highest-priority;xbm. Codecs with missing dependencies will be disabled regardless this setting. Default: empty list.
  • SAIL_ENABLE_CODECS="a;b;c" - Forcefully enable the codecs specified in this ';'-separated list. If an enabled codec fails to find its dependencies, the configuration process fails. One can also specify not just individual codecs but codec groups by their priority like that: highest-priority;xbm. Other codecs may or may not be enabled depending on found dependencies. When SAIL_ENABLE_CODECS is enabled, SAIL_ONLY_CODECS gets ignored. Default: empty list.
  • SAIL_ENABLE_OPENMP=ON|OFF - Enable OpenMP support if it's available in the compiler. Default: ON
  • SAIL_THIRD_PARTY_CODECS_PATH=ON|OFF - Enable loading custom codecs from the ';'-separated paths specified in the SAIL_THIRD_PARTY_CODECS_PATH environment variable. Default: ON.
  • SAIL_THREAD_SAFE=ON|OFF - Enable working in multi-threaded environments by locking the internal context with a mutex. Default: ON.
  • SAIL_ONLY_CODECS="a;b;c" - Forcefully enable only the codecs specified in this ';'-separated list and disable the rest. If an enabled codec fails to find its dependencies, the configuration process fails. One can also specify not just individual codecs but codec groups by their priority like that: highest-priority;xbm. Default: empty list.
  • SAIL_OPENMP_SCHEDULE="dynamic" - OpenMP scheduling algorithm. Default: dynamic.
Windows
Build requirements
  • Git
  • CMake 3.12 or later
  • MSVC 2019 or later
Build steps
Open Git Bash (installed along with git) and execute the following commands:
git clone --recursive https://github.com/HappySeaFox/sail.git
cd sail

# Compile third-party dependencies
cd extra
./build
cd ..

# Compile SAIL
mkdir build
cd build
cmake -A x64 -DCMAKE_INSTALL_PREFIX="C:\SAIL" ..
cmake --build . --config Release

# Install
cmake --build . --config Release --target install
Linux
Build requirements
  • Git
  • CMake 3.12 or later
  • GCC and G++ 7.5 or later
  • Standard C/C++ development files installed (usually installed by metapackages like build-essential)
  • Codec-specific development libraries installed. You can grab the list from debian/control
Build steps
git clone --recursive https://github.com/HappySeaFox/sail.git
cd sail

# Install the required dependencies grabbed from debian/control
sudo apt install ...

# Compile SAIL
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

# Install
... distro-specific installation