Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 1.08 KB

File metadata and controls

43 lines (36 loc) · 1.08 KB

Install FreeImage Library on Linux

  1. Install the following libraries
sudo apt-get install libfreeimage3 libfreeimage-dev
  1. Head to the FreeImage submodule
cd FreeImage/linux/FreeImage
  1. 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
  1. Head to the install_dir directory
cd install_dir
  1. 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
  1. 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)
  1. 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