Correct way to add linting support for used modules that exist outside project tree

In my case, I am using an ESMF that I built from source. I added the location of the .mod files to fortran.linter.includePaths and the ESMF source directory to fortran.fortls.directories (in addition to "./**") in my workspace settings. Is this the correct/recommended general approach? (It does seem to be working.)