As of version 4.4.5 the CMake option ENABLE_ECCODES is now ON by default. To build EMOSLIB with GRIB_API, please set -DENABLE_ECCODES=OFF.