According to the wiki page about ecCodes installation, ecCodes uses CMake for compilation and installation. To enable JPG feature of ecCodes, you are advised to configure the build with:
cmake -DENABLE_JPG=ON ...
This option of cmake should look for Jasper or OpenJPG. Install
openjpeg package with Homebrew for MacOS:
brew install openjpeg
openjpeg has been installed at
Then we need to make cmake recognize the installed openjpeg.
cmake -DENABLE_JPG=ON -DOPENJPEG_INCLUDE_DIR=/usr/local/Cellar/openjpeg/2.3.1/include/openjpeg-2.3
In the printed debug information, you will see:
-- The following OPTIONAL packages have been found: * Git * HDF5 * NumPy * CMath * JPEG * OpenJPEG
You have enabled JPG feature successfully.