The header includes look correct so I'm guessing a
linker problem.
Ideas?
You need to link to libfam.so or libgamin-1.so. I don't know how to do the CMake wizardry right but if pkg-config is to be used both fam and gamin shall be checked in the CMakeLists.txt.
I won't pretend to fully understand much about cmake, but I took an educated guess and updated my patch to use the pkg_search_module function, but no success. :(
Try the attached patch. Ubuntu doesn't use gamin and I haven't noticed the problems you are experiencing with respect to files not showing up, but it is a good idea to enable this feature nevertheless.
Tim