Install FreeImage Library on Linux Install the following libraries sudo apt-get install libfreeimage3 libfreeimage-dev Head to the FreeImage submodule cd FreeImage/linux/FreeImage Build the project cmake . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=install_dir cmake --build cmake-build-debug --config Debug --target install Head to the install_dir directory cd install_dir Inspect that the FreeImage.h and FreeImage.a header and library file is present in the following directories FreeImage.h -> install_dir/include FreeImage.a -> install_dir/lib Head back to the top-level CMakeLists.txt file for this project, set the option to build 2DImageFilter to ON # Add option to build 2DImageFilter application option(BUILD_2D_IMAGE_FILTER "Build the 2DImageFilter application" ON) Remove the build cache and re-build the whole project sudo rm -rf build mkdir build cmake -S . -B build -DBUILD_2D_IMAGE_FILTER=OFF cd build make